Blender
V3.3
|
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_fileops.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_screen.h"
#include "ED_undo.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "buttons_intern.h"
Go to the source code of this file.
Classes | |
struct | FileBrowseOp |
Functions | |
Start / Clear Search Filter Operators | |
| |
static int | buttons_start_filter_exec (bContext *C, wmOperator *UNUSED(op)) |
void | BUTTONS_OT_start_filter (struct wmOperatorType *ot) |
static int | buttons_clear_filter_exec (bContext *C, wmOperator *UNUSED(op)) |
void | BUTTONS_OT_clear_filter (struct wmOperatorType *ot) |
Pin ID Operator | |
static int | toggle_pin_exec (bContext *C, wmOperator *UNUSED(op)) |
void | BUTTONS_OT_toggle_pin (wmOperatorType *ot) |
Context Menu Operator | |
static int | context_menu_invoke (bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event)) |
void | BUTTONS_OT_context_menu (wmOperatorType *ot) |
File Browse Operator | |
typedef struct FileBrowseOp | FileBrowseOp |
static int | file_browse_exec (bContext *C, wmOperator *op) |
static void | file_browse_cancel (bContext *UNUSED(C), wmOperator *op) |
static int | file_browse_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
void | BUTTONS_OT_file_browse (wmOperatorType *ot) |
void | BUTTONS_OT_directory_browse (wmOperatorType *ot) |
typedef struct FileBrowseOp FileBrowseOp |
|
static |
Definition at line 73 of file buttons_ops.c.
References blender::compositor::area(), C, CTX_wm_area(), CTX_wm_region(), CTX_wm_space_properties(), ED_area_tag_redraw(), ED_region_search_filter_update(), OPERATOR_FINISHED, SpaceProperties::runtime, and SpaceProperties_Runtime::search_string.
Referenced by BUTTONS_OT_clear_filter().
void BUTTONS_OT_clear_filter | ( | struct wmOperatorType * | ot | ) |
Definition at line 86 of file buttons_ops.c.
References buttons_clear_filter_exec(), wmOperatorType::description, ED_operator_buttons_active(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by buttons_operatortypes().
void BUTTONS_OT_context_menu | ( | wmOperatorType * | ot | ) |
Definition at line 156 of file buttons_ops.c.
References context_menu_invoke(), wmOperatorType::description, ED_operator_buttons_active(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by buttons_operatortypes().
void BUTTONS_OT_directory_browse | ( | struct wmOperatorType * | ot | ) |
Second operator, only difference from BUTTONS_OT_file_browse is WM_FILESEL_DIRECTORY.
Definition at line 371 of file buttons_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, file_browse_cancel(), file_browse_exec(), file_browse_invoke(), FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_SPECIAL, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, WM_FILESEL_DIRECTORY, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by buttons_operatortypes().
void BUTTONS_OT_file_browse | ( | wmOperatorType * | ot | ) |
Definition at line 345 of file buttons_ops.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, file_browse_cancel(), file_browse_exec(), file_browse_invoke(), FILE_DEFAULTDISPLAY, FILE_OPENFILE, FILE_SORT_DEFAULT, FILE_SPECIAL, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, WM_FILESEL_FILEPATH, WM_FILESEL_RELPATH, and WM_operator_properties_filesel().
Referenced by buttons_operatortypes().
void BUTTONS_OT_start_filter | ( | struct wmOperatorType * | ot | ) |
Definition at line 61 of file buttons_ops.c.
References buttons_start_filter_exec(), wmOperatorType::description, ED_operator_buttons_active(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by buttons_operatortypes().
void BUTTONS_OT_toggle_pin | ( | wmOperatorType * | ot | ) |
Definition at line 127 of file buttons_ops.c.
References wmOperatorType::description, ED_operator_buttons_active(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, and toggle_pin_exec().
Referenced by buttons_operatortypes().
|
static |
Definition at line 47 of file buttons_ops.c.
References blender::compositor::area(), BKE_area_find_region_type(), C, CTX_wm_area(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_space_properties(), OPERATOR_FINISHED, RGN_TYPE_HEADER, and UI_textbutton_activate_rna().
Referenced by BUTTONS_OT_start_filter().
|
static |
Definition at line 145 of file buttons_ops.c.
References C, IFACE_, NULL, OPERATOR_INTERFACE, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and uiItemM().
Referenced by BUTTONS_OT_context_menu().
|
static |
Definition at line 256 of file buttons_ops.c.
References wmOperator::customdata, MEM_freeN, and NULL.
Referenced by BUTTONS_OT_directory_browse(), and BUTTONS_OT_file_browse().
|
static |
Definition at line 181 of file buttons_ops.c.
References BKE_main_blendfile_path(), BLI_is_dir(), BLI_path_abs(), BLI_path_rel(), BLI_path_slash_ensure(), BLI_path_slash_rfind(), BLI_strncpy(), C, CTX_data_main(), wmOperator::customdata, PointerRNA::data, ED_undo_operator_repeat(), ED_undo_push(), FILE_MAX, id, ID_BLEND_PATH, FileBrowseOp::is_undo, FileBrowseOp::is_userdef, MEM_freeN, MEM_reallocN, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, PointerRNA::owner_id, FileBrowseOp::prop, PROP_DIRPATH, FileBrowseOp::ptr, wmOperator::ptr, RNA_boolean_get(), RNA_property_identifier(), RNA_property_string_set(), RNA_property_subtype(), RNA_property_update(), RNA_string_get_alloc(), RNA_struct_find_property(), RNA_struct_property_is_set(), str, and WM_operator_last_redo().
Referenced by BUTTONS_OT_directory_browse(), and BUTTONS_OT_file_browse().
|
static |
Definition at line 262 of file buttons_ops.c.
References BKE_report(), BLI_path_is_rel(), BLI_path_slash_rfind(), C, CTX_wm_space_file(), wmOperator::customdata, PointerRNA::data, FileBrowseOp::is_undo, FileBrowseOp::is_userdef, KM_ALT, KM_SHIFT, MEM_callocN, MEM_freeN, wmEvent::modifier, NULL, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, ot, FileBrowseOp::prop, FileBrowseOp::ptr, wmOperator::ptr, ptr, wmOperator::reports, RNA_property_boolean_set(), RNA_property_is_set(), RNA_property_string_get_alloc(), RNA_string_set(), RNA_struct_find_property(), RPT_ERROR, str, UI_context_active_but_prop_get_filebrowser(), UNLIKELY, USER_RELPATHS, WM_event_add_fileselect(), WM_OP_EXEC_DEFAULT, WM_operator_name_call_ptr(), WM_operator_properties_create_ptr(), WM_operator_properties_free(), and WM_operatortype_find().
Referenced by BUTTONS_OT_directory_browse(), and BUTTONS_OT_file_browse().
|
static |
Definition at line 104 of file buttons_ops.c.
References buttons_context_id_path(), C, CTX_wm_area(), CTX_wm_screen(), CTX_wm_space_properties(), ED_area_tag_redraw(), SpaceProperties::flag, bScreen::id, NULL, OPERATOR_FINISHED, RNA_id_pointer_create(), RNA_pointer_create(), RNA_pointer_set(), and SB_PIN_CONTEXT.
Referenced by BUTTONS_OT_toggle_pin().