|
Blender V4.3
|
#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLT_translation.hh"#include "BKE_file_handler.hh"#include "CLG_log.h"#include "DNA_space_types.h"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_prototypes.hh"#include "WM_api.hh"#include "WM_types.hh"#include "UI_interface.hh"#include "io_drop_import_file.hh"#include "io_utils.hh"Go to the source code of this file.
Functions | |
| static blender::Vector< blender::bke::FileHandlerType * > | drop_import_file_poll_file_handlers (const bContext *C, const blender::Span< std::string > paths, const bool quiet=true) |
| static PointerRNA | file_handler_import_operator_create_ptr (const blender::bke::FileHandlerType *file_handler, const blender::Span< std::string > paths) |
| static int | wm_drop_import_file_exec (bContext *C, wmOperator *op) |
| static int | wm_drop_import_file_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| void | WM_OT_drop_import_file (wmOperatorType *ot) |
| static void | drop_import_file_copy (bContext *, wmDrag *drag, wmDropBox *drop) |
| static bool | drop_import_file_poll (bContext *C, wmDrag *drag, const wmEvent *) |
| static std::string | drop_import_file_tooltip (bContext *C, wmDrag *drag, const int[2], wmDropBox *) |
| void | ED_dropbox_drop_import_file () |
Variables | |
| static CLG_LogRef | LOG = {"io.drop_import_file"} |
Definition at line 177 of file io_drop_import_file.cc.
References BLI_path_split_dir_part(), BLI_path_split_file_part(), FILE_MAX, wmDropBox::ptr, RNA_collection_add(), RNA_collection_clear(), RNA_string_set(), and WM_drag_get_paths().
Referenced by ED_dropbox_drop_import_file().
Definition at line 196 of file io_drop_import_file.cc.
References drop_import_file_poll_file_handlers(), wmDrag::type, WM_drag_get_paths(), and WM_DRAG_PATH.
Referenced by ED_dropbox_drop_import_file().
|
static |
Return a vector of file handlers that support any file path in paths and the call to poll_drop returns true. Unlike bke::file_handlers_poll_file_drop, it ensures that file handlers have a valid import operator.
Definition at line 35 of file io_drop_import_file.cc.
References blender::bke::FileHandlerType::import_operator, and WM_operatortype_find().
Referenced by drop_import_file_poll(), drop_import_file_tooltip(), wm_drop_import_file_exec(), and wm_drop_import_file_invoke().
|
static |
Definition at line 205 of file io_drop_import_file.cc.
References drop_import_file_poll_file_handlers(), wmOperatorType::name, ot, TIP_, WM_drag_get_paths(), and WM_operatortype_find().
Referenced by ED_dropbox_drop_import_file().
| void ED_dropbox_drop_import_file | ( | ) |
Definition at line 220 of file io_drop_import_file.cc.
References drop_import_file_copy(), drop_import_file_poll(), drop_import_file_tooltip(), RGN_TYPE_WINDOW, SPACE_EMPTY, WM_dropbox_add(), and WM_dropboxmap_find().
Referenced by ED_operatortypes_io().
|
static |
Creates a RNA pointer for the FileHandlerType.import_operator and sets on it all supported file paths from paths.
The directory and files properties are both required for handling multiple files, if only one is defined means that the other is missing.
Definition at line 50 of file io_drop_import_file.cc.
References BLI_assert, BLI_path_split_dir_part(), BLI_path_split_file_part(), CLOG_WARN, FILE_MAX, blender::bke::FileHandlerType::filter_supported_paths(), blender::bke::FileHandlerType::import_operator, LOG, ot, PROP_STRING, RNA_property_collection_add(), RNA_property_collection_clear(), RNA_property_string_set(), RNA_string_set(), RNA_struct_find_collection_property_check(), RNA_struct_find_property_check(), WM_operator_properties_create_ptr(), and WM_operatortype_find().
Referenced by wm_drop_import_file_exec(), and wm_drop_import_file_invoke().
|
static |
Definition at line 101 of file io_drop_import_file.cc.
References drop_import_file_poll_file_handlers(), file_handler_import_operator_create_ptr(), OPERATOR_CANCELLED, OPERATOR_FINISHED, ot, blender::ed::io::paths_from_operator_properties(), wmOperator::ptr, WM_OP_INVOKE_DEFAULT, WM_operator_name_call_ptr(), WM_operator_properties_free(), and WM_operatortype_find().
Referenced by wm_drop_import_file_invoke(), and WM_OT_drop_import_file().
|
static |
Create a menu with all file handler import operators that can support any files in paths and let user decide which to use.
Definition at line 121 of file io_drop_import_file.cc.
References CTX_TIP_, PointerRNA::data, drop_import_file_poll_file_handlers(), file_handler_import_operator_create_ptr(), wmOperatorType::name, OPERATOR_CANCELLED, OPERATOR_INTERFACE, ot, blender::ed::io::paths_from_operator_properties(), wmOperator::ptr, wmOperatorType::translation_context, UI_ITEM_NONE, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiItemFullO_ptr(), uiLayoutSetOperatorContext(), wm_drop_import_file_exec(), WM_OP_INVOKE_DEFAULT, and WM_operatortype_find().
Referenced by WM_OT_drop_import_file().
| void WM_OT_drop_import_file | ( | wmOperatorType * | ot | ) |
Definition at line 158 of file io_drop_import_file.cc.
References wmOperatorType::description, wmOperatorType::exec, FILE_MAX, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_INTERNAL, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_collection_runtime(), RNA_def_property_flag(), RNA_def_string_dir_path(), wmOperatorType::srna, wm_drop_import_file_exec(), and wm_drop_import_file_invoke().
Referenced by ED_operatortypes_io().
|
static |
Definition at line 28 of file io_drop_import_file.cc.
Referenced by file_handler_import_operator_create_ptr().