|
Blender V4.5
|
#include "BLI_path_utils.hh"#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 void | file_handler_import_operator_write_ptr (const blender::bke::FileHandlerType *file_handler, PointerRNA &props, const blender::Span< std::string > paths) |
| static wmOperatorStatus | wm_drop_import_file_exec (bContext *C, wmOperator *op) |
| static wmOperatorStatus | 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 173 of file io_drop_import_file.cc.
References blender::ed::io::paths_to_operator_properties(), wmDropBox::ptr, and WM_drag_get_paths().
Referenced by ED_dropbox_drop_import_file().
Definition at line 178 of file io_drop_import_file.cc.
References C, 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 34 of file io_drop_import_file.cc.
References C, blender::bke::file_handlers_poll_file_drop(), 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 187 of file io_drop_import_file.cc.
References C, drop_import_file_poll_file_handlers(), 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 202 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 |
Sets in the RNA pointer all file paths supported by the file handler.
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 48 of file io_drop_import_file.cc.
References BLI_path_split_dir_part(), BLI_path_split_file_part(), CLOG_WARN, FILE_MAX, blender::bke::FileHandlerType::filter_supported_paths(), LOG, PROP_STRING, RNA_property_collection_add(), RNA_property_collection_clear(), RNA_property_string_set(), RNA_string_set(), RNA_struct_find_collection_property_check(), and RNA_struct_find_property_check().
Referenced by wm_drop_import_file_exec(), and wm_drop_import_file_invoke().
|
static |
Definition at line 96 of file io_drop_import_file.cc.
References C, drop_import_file_poll_file_handlers(), file_handler_import_operator_write_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_create_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 118 of file io_drop_import_file.cc.
References C, CTX_TIP_, drop_import_file_poll_file_handlers(), file_handler_import_operator_write_ptr(), uiLayout::op(), OPERATOR_CANCELLED, OPERATOR_INTERFACE, ot, blender::ed::io::paths_from_operator_properties(), wmOperator::ptr, UI_ITEM_NONE, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), 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 154 of file io_drop_import_file.cc.
References FILE_MAX, OPTYPE_INTERNAL, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_collection_runtime(), RNA_def_property_flag(), RNA_def_string_dir_path(), wm_drop_import_file_exec(), and wm_drop_import_file_invoke().
Referenced by ED_operatortypes_io().
|
static |
Definition at line 27 of file io_drop_import_file.cc.