Blender
V3.3
|
#include "BLI_compiler_attrs.h"
#include "BLI_sys_types.h"
#include "DNA_windowmanager_types.h"
#include "WM_keymap.h"
#include "WM_types.h"
Go to the source code of this file.
Classes | |
struct | wmEventHandler_KeymapResult |
struct | CheckerIntervalParams |
Macros | |
#define | WM_operatortype_prop_tag(property, tags) |
Typedefs | |
typedef struct wmGizmo | wmGizmo |
typedef struct wmGizmoMap | wmGizmoMap |
typedef struct wmGizmoMapType | wmGizmoMapType |
typedef struct wmJob | wmJob |
typedef enum eWindowAlignment | eWindowAlignment |
typedef bool(* | EventHandlerPoll) (const ARegion *region, const struct wmEvent *event) |
typedef struct wmEventHandler_KeymapResult | wmEventHandler_KeymapResult |
typedef void() | wmEventHandler_KeymapDynamicFn(wmWindowManager *wm, struct wmWindow *win, struct wmEventHandler_Keymap *handler, struct wmEventHandler_KeymapResult *km_result) |
typedef int(* | wmUIHandlerFunc) (struct bContext *C, const struct wmEvent *event, void *userdata) |
typedef void(* | wmUIHandlerRemoveFunc) (struct bContext *C, void *userdata) |
typedef enum eFileSel_Flag | eFileSel_Flag |
typedef enum eFileSel_Action | eFileSel_Action |
typedef void(* | wm_jobs_start_callback) (void *custom_data, short *stop, short *do_update, float *progress) |
typedef struct ARegion *(* | wmTooltipInitFn) (struct bContext *C, struct ARegion *region, int *pass, double *r_pass_delay, bool *r_exit_on_event) |
#define WM_operatortype_prop_tag | ( | property, | |
tags | |||
) |
typedef enum eFileSel_Action eFileSel_Action |
Action for WM_operator_properties_filesel.
typedef enum eFileSel_Flag eFileSel_Flag |
Flags for WM_operator_properties_filesel.
typedef enum eWindowAlignment eWindowAlignment |
typedef void() wmEventHandler_KeymapDynamicFn(wmWindowManager *wm, struct wmWindow *win, struct wmEventHandler_Keymap *handler, struct wmEventHandler_KeymapResult *km_result) |
typedef struct wmEventHandler_KeymapResult wmEventHandler_KeymapResult |
typedef struct wmGizmoMap wmGizmoMap |
typedef struct wmGizmoMapType wmGizmoMapType |
anonymous enum |
anonymous enum |
anonymous enum |
Identifying jobs by owner alone is unreliable, this isn't saved, order can change (keep 0 for 'any').
enum eFileSel_Action |
Action for WM_operator_properties_filesel.
Enumerator | |
---|---|
FILE_OPENFILE | |
FILE_SAVE |
enum eFileSel_Flag |
Flags for WM_operator_properties_filesel.
Enumerator | |
---|---|
WM_FILESEL_RELPATH | |
WM_FILESEL_DIRECTORY | |
WM_FILESEL_FILENAME | |
WM_FILESEL_FILEPATH | |
WM_FILESEL_FILES | |
WM_FILESEL_SHOW_PROPS | Show the properties sidebar by default. |
enum eWindowAlignment |
Definition at line 472 of file wm.c.
References BLI_listbase_is_empty(), C, CTX_data_main(), CTX_wm_manager(), CTX_wm_manager_set(), ED_screens_init(), ListBase::first, G, wmWindowManager::initialized, wmWindowManager::message_bus, NULL, wmWindowManager::windows, Main::wm, WM_file_autosave_init(), WM_keyconfig_init(), WM_msgbus_create(), wm_window_ghostwindows_ensure(), and WM_WINDOW_IS_INIT.
Referenced by WM_file_read(), wm_homefile_read_ex(), wm_window_copy_test(), and WM_window_open().
char* WM_clipboard_text_get | ( | bool | selection, |
int * | r_len | ||
) |
Return text from the clipboard.
Definition at line 1770 of file wm_window.c.
References wm_clipboard_text_get_ex().
Referenced by console_paste_exec(), paste_text_exec(), pyrna_WindowManager_clipboard_get(), and text_paste_exec().
char* WM_clipboard_text_get_firstline | ( | bool | selection, |
int * | r_len | ||
) |
Convenience function for pasting to areas of Blender which don't support newlines.
Definition at line 1775 of file wm_window.c.
References wm_clipboard_text_get_ex().
Referenced by handleNumInput(), ui_but_get_pasted_text_from_clipboard(), and ui_textedit_copypaste().
Definition at line 1780 of file wm_window.c.
References G, GHOST_putClipboard(), MEM_callocN, and MEM_freeN.
Referenced by console_copy_exec(), console_cursor_set_exit(), copy_data_path_button_exec(), copy_python_command_button_exec(), copy_selection(), handleNumInput(), report_copy_exec(), text_cursor_set_exit(), txt_copy_clipboard(), ui_but_copy(), and ui_textedit_copypaste().
char* WM_context_path_resolve_full | ( | struct bContext * | C, |
const PointerRNA * | ptr | ||
) |
Definition at line 617 of file wm_operators.c.
References C, NULL, ptr, and WM_context_path_resolve_property_full().
Referenced by ui_but_is_user_menu_compatible(), ui_but_user_menu_add(), and ui_but_user_menu_find().
char* WM_context_path_resolve_property_full | ( | const struct bContext * | C, |
const PointerRNA * | ptr, | ||
PropertyRNA * | prop, | ||
int | index | ||
) |
Calculate the path to ptr
from context C
, or return NULL if it can't be calculated.
Definition at line 263 of file wm_cursors.c.
References G, G_DEBUG, GHOST_kAxisNone, GHOST_kGrabDisable, GHOST_SetCursorGrab(), wmWindow::ghostwin, wmWindow::grabcursor, NULL, and wm_cursor_position_to_ghost_screen_coords().
Referenced by button_activate_state(), poselib_blend_cleanup(), WM_event_remove_handlers(), wm_gizmomap_modal_set(), and wm_handler_operator_call().
bounds | can be NULL |
Definition at line 226 of file wm_cursors.c.
References bounds(), wmWindow::eventstate, G, G_DEBUG, GHOST_kAxisX, GHOST_kAxisY, GHOST_kGrabHide, GHOST_kGrabNormal, GHOST_kGrabWrap, GHOST_SetCursorGrab(), wmWindow::ghostwin, wmWindow::grabcursor, wmTabletData::is_motion_absolute, NULL, wmEvent::tablet, wm_cursor_position_to_ghost_screen_coords(), WM_CURSOR_WRAP_X, WM_CURSOR_WRAP_Y, and blender::bke::image::partial_update::wrap().
Referenced by button_activate_state(), initWalkInfo(), poselib_blend_cursor_update(), walkEnd(), wm_gizmomap_modal_set(), wm_macro_modal(), and wm_operator_invoke().
Definition at line 200 of file wm_cursors.c.
References wmWindow::lastcursor, wmWindow::modalcursor, and WM_cursor_set().
Referenced by annotation_draw_exit(), area_split_exit(), area_swap_exit(), button_activate_exit(), curve_draw_exit(), datadropper_exit(), depthdropper_exit(), driverdropper_exit(), eyedropper_colorband_exit(), eyedropper_exit(), face_set_extract_modal(), gesture_modal_end(), gpencil_draw_modal(), gpencil_fill_exit(), gpencil_fill_modal(), gpencil_interpolate_modal(), gpencil_primitive_interaction_end(), gpencil_primitive_modal(), graph_slider_exit(), image_view_pan_exit(), image_view_zoom_exit(), knifetool_exit_ex(), blender::ed::space_node::node_resize_exit(), pose_slide_modal(), postTrans(), sample_color_modal(), screen_opengl_render_end(), sculpt_sample_detail_size_modal(), ui_handler_wait_for_input(), ui_numedit_set_active(), ui_textedit_end(), view_pan_exit(), view_pan_modal(), view_zoom_exit(), view_zoomdrag_modal(), WM_cursor_wait(), and wm_drags_exit().
Definition at line 191 of file wm_cursors.c.
References wmWindow::cursor, wmWindow::lastcursor, wmWindow::modalcursor, and WM_cursor_set().
Referenced by annotation_draw_cursor_set(), area_swap_invoke(), button_activate_init(), curve_draw_invoke(), datadropper_invoke(), depthdropper_invoke(), driverdropper_invoke(), eyedropper_colorband_invoke(), eyedropper_invoke(), face_set_extract_invoke(), gpencil_draw_modal(), gpencil_fill_invoke(), gpencil_interpolate_invoke(), gpencil_primitive_edit_event_handling(), gpencil_primitive_invoke(), gpencil_primitive_modal(), graph_slider_invoke(), image_view_pan_init(), image_view_zoom_init(), initMouseInputMode(), knifetool_invoke(), blender::ed::space_node::node_resize_init(), pose_slide_invoke_common(), sample_color_invoke(), sculpt_sample_detail_size_invoke(), ui_numedit_set_active(), ui_textedit_begin(), view_pan_init(), view_pan_invoke(), view_zoom_init(), view_zoomdrag_invoke(), WM_cursor_wait(), wm_drags_check_ops(), WM_gesture_lasso_invoke(), WM_gesture_lines_invoke(), WM_gesture_straightline_invoke(), and WM_operator_name_call_ptr_with_depends_on_cursor().
Definition at line 126 of file wm_cursors.c.
References BlenderCursor, BLI_assert_msg, convert_to_ghost_standard_cursor(), wmWindow::cursor, G, GHOST_HasCursorShape(), GHOST_kStandardCursorCustom, GHOST_kStandardCursorDefault, GHOST_SetCursorShape(), GHOST_SetCursorVisibility(), wmWindow::ghostwin, wmWindow::modalcursor, NULL, window_set_custom_cursor_ex(), WM_CURSOR_DEFAULT, WM_CURSOR_NONE, and WM_CURSOR_NUM.
Referenced by actionzone_modal(), area_join_modal(), area_split_preview_update_cursor(), area_swap_modal(), clip_tracking_hide_cursor(), clip_tracking_show_cursor(), console_cursor(), ED_region_cursor_set(), gpencil_transform_fill_invoke(), gpencil_uv_transform_exit(), blender::ed::space_node::node_set_cursor(), paint_update_mouse_cursor(), screen_cursor_set(), text_cursor(), ui_popup_block_create(), view3d_main_region_cursor(), WM_cursor_modal_restore(), WM_cursor_modal_set(), WM_cursor_set_from_tool(), WM_gizmomap_cursor_set(), and wm_gizmomap_highlight_set().
bool WM_cursor_set_from_tool | ( | struct wmWindow * | win, |
const ScrArea * | area, | ||
const ARegion * | region | ||
) |
Definition at line 174 of file wm_cursors.c.
References blender::compositor::area(), wmWindow::cursor, bToolRef_Runtime::cursor, ELEM, if(), wmWindow::modalcursor, NULL, ARegion::regiontype, RGN_TYPE_PREVIEW, RGN_TYPE_WINDOW, WM_CURSOR_DEFAULT, and WM_cursor_set().
Referenced by ED_region_cursor_set(), and view3d_main_region_cursor().
bool WM_cursor_test_motion_and_update | ( | const int | mval[2] | ) |
Detect motion between selection (callers should only use this for selection picking), typically mouse press/click events.
mval | Region relative coordinates, call with (-1, -1) resets the last cursor location. |
NOTE(@campbellbarton): The logic used here isn't foolproof. It's possible that users move the cursor past WM_EVENT_CURSOR_MOTION_THRESHOLD then back to a position within the threshold (between mouse clicks). In practice users never reported this since the threshold is very small (a few pixels). To prevent the unlikely case of values matching from another region, changing regions resets this value to (-1, -1).
Definition at line 329 of file wm_event_query.c.
References copy_v2_v2_int(), len_manhattan_v2v2_int(), and WM_EVENT_CURSOR_MOTION_THRESHOLD.
Referenced by ED_screen_set_active_region(), get_nearest_editbonepoint(), mixed_bones_object_selectbuffer_extended(), seq_select_seq_from_preview(), and unified_findnearest().
After this you can call restore too.
Definition at line 317 of file wm_cursors.c.
References wmWindow::cursor, wmWindow::lastcursor, mask(), window_set_custom_cursor(), x, and y.
Referenced by gpencil_do_frame_fill(), gpencil_fill_modal(), and screen_opengl_render_anim_step().
To allow usage all over, we do entire WM.
Definition at line 209 of file wm_cursors.c.
References ListBase::first, G, G_MAIN, wmWindow::next, NULL, wmWindowManager::windows, WM_cursor_modal_restore(), WM_cursor_modal_set(), and WM_CURSOR_WAIT.
Referenced by asset_bundle_install_exec(), associate_blend_exec(), bake_invoke(), ED_object_parent_set(), edbm_duplicate_invoke(), gpencil_bake_grease_pencil_animation_exec(), light_cache_bake_invoke(), multiresbake_image_exec(), redraw_timer_exec(), save_image_op(), screen_render_invoke(), script_reload_exec(), sculpt_dynamic_topology_toggle_exec(), separate_armature_exec(), separate_exec(), solve_camera_invoke(), track_markers(), WM_file_read(), and wm_file_write().
This function requires access to the GHOST_SystemHandle (g_system).
Definition at line 2054 of file wm_window.c.
References wmWindow::eventstate, g_system, GHOST_SetCursorPosition(), wmWindow::ghostwin, wmEvent::prev_xy, wm_cursor_position_to_ghost_client_coords(), x, wmEvent::xy, and y.
Referenced by initFlyInfo(), wm_cursor_warp_relative(), and wm_gizmomap_modal_set().
void WM_drag_add_asset_list_item | ( | wmDrag * | drag, |
const struct bContext * | C, | ||
const struct AssetLibraryReference * | asset_library_ref, | ||
const struct AssetHandle * | asset | ||
) |
Definition at line 508 of file wm_dragdrop.cc.
References BLI_addtail(), BLI_assert_msg, wmDragID::from_parent, GS, id, wmDragID::id, wmDrag::ids, LISTBASE_FOREACH, and ID::name.
Referenced by outliner_item_drag_drop_invoke(), and WM_drag_data_create().
ID* WM_drag_asset_id_import | ( | wmDragAsset * | asset_drag, |
int | flag_extra | ||
) |
flag_extra | Additional linking flags (from eFileSel_Params_Flag). |
Definition at line 608 of file wm_dragdrop.cc.
References BLI_assert, BLI_assert_unreachable, BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR, BLO_LIBLINK_APPEND_LOCAL_ID_REUSE, BLO_LIBLINK_APPEND_RECURSIVE, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), wmDragAsset::evil_C, FILE_ACTIVE_COLLECTION, FILE_ASSET_IMPORT_APPEND, FILE_ASSET_IMPORT_APPEND_REUSE, FILE_ASSET_IMPORT_LINK, FILE_AUTOSELECT, G_MAIN, wmDragAsset::id_type, wmDragAsset::import_type, wmDragAsset::name, wmDragAsset::path, scene, WM_file_append_datablock(), and WM_file_link_datablock().
Referenced by view3d_collection_drop_copy_external_asset(), view3d_ob_drop_copy_external_asset(), and WM_drag_get_local_ID_or_import_from_asset().
Definition at line 748 of file wm_dragdrop.cc.
References wmDrag::asset_items, wmDrag::type, and WM_DRAG_ASSET_LIST.
Referenced by blender::ed::asset_browser::AssetCatalogDropController::drop_assets_into_catalog(), and blender::ed::asset_browser::AssetCatalogDropController::has_droppable_asset().
Definition at line 657 of file wm_dragdrop.cc.
References FILE_ASSET_IMPORT_LINK, wmDragAsset::import_type, wmDrag::type, WM_DRAG_ASSET, and WM_drag_get_asset_data().
Referenced by view3d_ob_drop_draw_activate().
wmDragAsset* WM_drag_create_asset_data | ( | const struct AssetHandle * | asset, |
struct AssetMetaData * | metadata, | ||
const char * | path, | ||
int | import_type | ||
) |
wmDrag* WM_drag_data_create | ( | struct bContext * | C, |
int | icon, | ||
int | type, | ||
void * | poin, | ||
double | value, | ||
unsigned int | flags | ||
) |
Create and fill the dragging data, but don't start dragging just yet (unlike WM_event_start_drag()). Must be followed up by WM_event_start_prepared_drag(), otherwise the returned pointer will leak memory.
Note that poin should be valid allocated and not on stack.
Definition at line 177 of file wm_dragdrop.cc.
References BLI_freelistN(), BLI_strncpy(), C, CTX_data_collection_get(), CTX_wm_asset_library_ref(), FILE_MAX, wmDrag::flags, wmDrag::icon, LISTBASE_FOREACH, MEM_freeN, wmDrag::path, wmDrag::poin, type, wmDrag::type, wmDrag::value, WM_drag_add_asset_list_item(), WM_drag_add_local_ID(), WM_DRAG_ASSET, WM_DRAG_ASSET_CATALOG, WM_DRAG_ASSET_LIST, WM_DRAG_FREE_DATA, WM_DRAG_ID, and WM_DRAG_PATH.
Referenced by outliner_item_drag_drop_invoke(), ui_but_drag_start(), and WM_event_start_drag().
Definition at line 294 of file wm_dragdrop.cc.
References MEM_freeN, WM_DRAG_ASSET, and wm_drag_free_asset_data().
Referenced by ui_but_drag_free(), UI_but_drag_set_asset(), UI_but_drag_set_id(), UI_but_drag_set_image(), UI_but_drag_set_name(), UI_but_drag_set_path(), UI_but_drag_set_rna(), and WM_drag_free().
void WM_drag_draw_default_fn | ( | struct bContext * | C, |
struct wmWindow * | win, | ||
struct wmDrag * | drag, | ||
const int | xy[2] | ||
) |
Definition at line 961 of file wm_dragdrop.cc.
References C, wm_drag_draw_default(), and xy.
void WM_drag_draw_item_name_fn | ( | struct bContext * | C, |
struct wmWindow * | win, | ||
struct wmDrag * | drag, | ||
const int | xy[2] | ||
) |
Definition at line 311 of file wm_dragdrop.cc.
References wmDragActiveDropState::active_dropbox, wmDrag::asset_items, BLI_freelinkN(), BLI_freelistN(), wmDragActiveDropState::disabled_info, wmDropBox::draw_deactivate, wmDrag::drop_state, wmDrag::flags, wmDragActiveDropState::free_disabled_info, wmDrag::ids, LISTBASE_FOREACH_MUTABLE, MEM_freeN, MEM_SAFE_FREE, wmDrag::poin, wmDrag::type, wmDragActiveDropState::ui_context, WM_drag_data_free(), wm_drag_free_asset_data(), WM_DRAG_FREE_DATA, and wm_drop_ui_context_free().
Referenced by WM_drag_free_list().
void WM_drag_free_imported_drag_ID | ( | struct Main * | bmain, |
struct wmDrag * | drag, | ||
struct wmDropBox * | drop | ||
) |
Free asset ID imported for canceled drop.
If the asset was imported (linked/appended) using WM_drag_get_local_ID_or_import_from_asset()` (typically via a wmDropBox.copy() callback), we want the ID to be removed again if the drop operator cancels. This is for use as wmDropBox.cancel() callback.
Definition at line 686 of file wm_dragdrop.cc.
References BKE_id_free_us(), wmDragAsset::id_type, id_us_plus(), wmDropBox::ptr, wmDrag::type, WM_DRAG_ASSET, WM_drag_get_asset_data(), and WM_operator_properties_id_lookup_from_name_or_session_uuid().
Referenced by ED_dropboxes_ui(), blender::ed::space_node::node_dropboxes(), and view3d_dropboxes().
Definition at line 333 of file wm_dragdrop.cc.
References BLI_pophead(), and WM_drag_free().
Referenced by wm_close_and_free(), wm_event_custom_free(), wm_event_drag_and_drop_test(), and wm_handlers_do_intern().
struct wmDragAssetCatalog* WM_drag_get_asset_catalog_data | ( | const struct wmDrag * | drag | ) |
struct wmDragAsset* WM_drag_get_asset_data | ( | const struct wmDrag * | drag, |
int | idcode | ||
) |
struct AssetMetaData* WM_drag_get_asset_meta_data | ( | const struct wmDrag * | drag, |
int | idcode | ||
) |
const char* WM_drag_get_item_name | ( | struct wmDrag * | drag | ) |
Definition at line 787 of file wm_dragdrop.cc.
References BKE_idtype_idcode_to_name_plural(), BLI_listbase_count_at_most(), GS, id, wmDrag::ids, wmDragAsset::name, ID::name, wmDrag::path, wmDrag::type, WM_DRAG_ASSET, WM_drag_get_asset_data(), WM_drag_get_local_ID(), WM_DRAG_ID, WM_DRAG_NAME, and WM_DRAG_PATH.
Referenced by ui_drop_material_tooltip(), view3d_mat_drop_tooltip(), and wm_drag_draw_item_name().
When dragging a local ID, return that. Otherwise, if dragging an asset-handle, link or append that depending on what was chosen by the drag-box (currently append only in fact).
Use WM_drag_free_imported_drag_ID() as cancel callback of the drop-box, so that the asset import is rolled back if the drop operator fails.
void* WM_draw_cb_activate | ( | struct wmWindow * | win, |
void(*)(const struct wmWindow *, void *) | draw, | ||
void * | customdata | ||
) |
Definition at line 561 of file wm_draw.c.
References BLI_addtail(), WindowDrawCB::customdata, WindowDrawCB::draw, wmWindow::drawcalls, and MEM_callocN.
Referenced by area_join_init(), area_split_invoke(), and eyedropper_init().
Definition at line 574 of file wm_draw.c.
References BLI_remlink(), wmWindow::drawcalls, LISTBASE_FOREACH, and MEM_freeN.
Referenced by area_join_exit(), area_split_exit(), and eyedropper_exit().
Definition at line 1360 of file wm_draw.c.
References ARegion::visible, and wm_draw_region_buffer_free().
Referenced by area_offscreen_exit(), ED_region_exit(), and ED_view3d_stop_render_preview().
struct GPUViewport* WM_draw_region_get_bound_viewport | ( | struct ARegion * | region | ) |
Definition at line 856 of file wm_draw.c.
References wmDrawBuffer::bound_view, ARegion::draw_buffer, NULL, and wmDrawBuffer::viewport.
Referenced by DRW_draw_render_loop_2d_ex(), DRW_draw_render_loop_ex(), DRW_draw_view(), and sequencer_ibuf_get().
struct GPUViewport* WM_draw_region_get_viewport | ( | struct ARegion * | region | ) |
Definition at line 846 of file wm_draw.c.
References ARegion::draw_buffer, NULL, and wmDrawBuffer::viewport.
Referenced by draw_timeline_seq(), DRW_draw_select_id(), DRW_notify_view_update(), ED_view3d_depth_override(), gizmo_find_intersected_3d(), blender::ed::space_node::node_draw_space(), sequencer_draw_preview(), view3d_depths_create(), view3d_depths_rect_create(), and wm_region_test_render_do_draw().
Definition at line 1411 of file wm_draw.c.
References NULL, and wm_draw_region_bind().
Referenced by ED_view3d_depth_override(), and ui_region_redraw_immediately().
Definition at line 1405 of file wm_draw.c.
References ARegion::regiontype, wm_draw_region_buffer_create(), and wm_region_use_viewport_by_type().
Referenced by ED_view3d_depth_override().
Definition at line 1416 of file wm_draw.c.
References wm_draw_region_unbind().
Referenced by ED_view3d_depth_override(), and ui_region_redraw_immediately().
struct wmDropBox* WM_dropbox_add | ( | ListBase * | lb, |
const char * | idname, | ||
bool(*)(struct bContext *, struct wmDrag *, const struct wmEvent *event) | poll, | ||
void(*)(struct bContext *, struct wmDrag *, struct wmDropBox *) | copy, | ||
void(*)(struct Main *, struct wmDrag *, struct wmDropBox *) | cancel, | ||
WMDropboxTooltipFunc | tooltip | ||
) |
ListBase* WM_dropboxmap_find | ( | const char * | idname, |
int | spaceid, | ||
int | regionid | ||
) |
spaceid
/ regionid
are zero for window drop maps.
Definition at line 76 of file wm_dragdrop.cc.
References BLI_addtail(), BLI_strncpy(), dropboxes, wmDropBoxMap::dropboxes, wmDropBoxMap::idname, KMAP_MAX_NAME, LISTBASE_FOREACH, wmDropBoxMap::regionid, wmDropBoxMap::spaceid, and STREQLEN.
Referenced by clip_dropboxes(), clip_init(), console_dropboxes(), console_main_region_init(), ed_default_handlers(), ED_dropboxes_ui(), ED_keymap_screen(), file_dropboxes(), image_dropboxes(), image_init(), blender::ed::space_node::node_dropboxes(), blender::ed::space_node::node_main_region_init(), outliner_dropboxes(), outliner_main_region_init(), sequencer_dropboxes(), sequencer_main_region_init(), sequencer_preview_region_init(), text_dropboxes(), text_main_region_init(), view3d_dropboxes(), view3d_main_region_init(), and wm_window_ghostwindow_ensure().
int WM_enum_search_invoke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
int WM_enum_search_invoke_previews | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
short | prv_cols, | ||
short | prv_rows | ||
) |
Similar to WM_enum_search_invoke, but draws previews. Also, this can't be used as invoke callback directly since it needs additional info.
Definition at line 1131 of file wm_operators.c.
References C, NULL, EnumSearchMenu::op, OPERATOR_INTERFACE, EnumSearchMenu::prv_cols, EnumSearchMenu::prv_rows, UI_popup_block_invoke(), EnumSearchMenu::use_previews, and wm_enum_search_menu().
int WM_event_absolute_delta_x | ( | const struct wmEvent * | event | ) |
Definition at line 552 of file wm_event_query.c.
References wmEvent::flag, and WM_EVENT_SCROLL_INVERT.
Referenced by view_zoomdrag_invoke().
int WM_event_absolute_delta_y | ( | const struct wmEvent * | event | ) |
Definition at line 563 of file wm_event_query.c.
References wmEvent::flag, and WM_EVENT_SCROLL_INVERT.
Referenced by ui_pan_to_scroll(), and view_zoomdrag_invoke().
void struct wmEvent struct wmEvent* wm_event_add | ( | struct wmWindow * | win, |
const struct wmEvent * | event_to_add | ||
) |
struct wmEventHandler_Dropbox* WM_event_add_dropbox_handler | ( | ListBase * | handlers, |
ListBase * | dropboxes | ||
) |
Definition at line 4564 of file wm_event_system.cc.
References BLI_addhead(), dropboxes, wmEventHandler_Dropbox::dropboxes, wmEventHandler_Dropbox::head, LISTBASE_FOREACH, wmEventHandler::type, and WM_HANDLER_TYPE_DROPBOX.
Referenced by clip_init(), console_main_region_init(), ed_default_handlers(), image_init(), blender::ed::space_node::node_main_region_init(), outliner_main_region_init(), sequencer_main_region_init(), sequencer_preview_region_init(), text_main_region_init(), view3d_main_region_init(), and wm_window_ghostwindow_ensure().
void struct wmEvent* wm_event_add_ex | ( | struct wmWindow * | win, |
const struct wmEvent * | event_to_add, | ||
const struct wmEvent * | event_to_add_after | ||
) |
void WM_event_add_fileselect | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
The idea here is to keep a handler alive on window queue, owning the operator. The file window can send event to make it execute, thus ensuring executing happens outside of lower level queues, with UI refreshed. Should also allow multi-window solutions.
Definition at line 4088 of file wm_event_system.cc.
References wmEventHandler_Op::area, BLI_addhead(), BLI_assert, C, wmOperatorType::check, wmEventHandler_Op::context, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), CTX_wm_window_set(), ED_fileselect_handler_area_find(), wmWindow::eventstate, EVT_FILESELECT_CANCEL, EVT_FILESELECT_EXTERNAL_CANCEL, EVT_FILESELECT_FULL_OPEN, wmEventHandler_Op::head, wmEventHandler_Op::is_fileselect, LISTBASE_FOREACH_MUTABLE, wmWindow::modalhandlers, wmEventHandler_Op::op, wmEventHandler_Op::region, wmOperator::type, wmEventHandler::type, UI_popup_handlers_remove_all(), wmEventHandler_Op::win, WM_event_fileselect_event(), wm_event_find_fileselect_root_window_from_context(), wm_handler_fileselect_do(), wm_handler_op_context_get_if_valid(), and WM_HANDLER_TYPE_OP.
Referenced by asset_bundle_install_invoke(), cachefile_layer_open_invoke(), cachefile_open_invoke(), clip_filesel(), file_browse_invoke(), find_missing_files_invoke(), image_filesel(), multires_external_save_invoke(), open_invoke(), paste_from_file_invoke(), preferences_asset_library_add_invoke(), rigidbody_world_export_invoke(), screenshot_invoke(), sequencer_add_image_strip_invoke(), sequencer_add_movie_strip_invoke(), sequencer_add_sound_strip_invoke(), sequencer_change_path_invoke(), sequencer_export_subtitles_invoke(), text_open_invoke(), text_save_as_invoke(), volume_import_invoke(), wm_lib_relocate_invoke(), wm_link_append_invoke(), wm_open_mainfile__select_file_path(), WM_operator_filesel(), wm_recover_auto_save_invoke(), wm_save_as_mainfile_invoke(), and wm_save_mainfile_invoke().
struct wmEventHandler_Keymap* WM_event_add_keymap_handler | ( | ListBase * | handlers, |
wmKeyMap * | keymap | ||
) |
Definition at line 4243 of file wm_event_system.cc.
References BLI_addtail(), CLOG_WARN, wmEventHandler_Keymap::head, wmEventHandler_Keymap::keymap, LISTBASE_FOREACH, wmEventHandler::type, WM_HANDLER_TYPE_KEYMAP, and WM_LOG_HANDLERS.
Referenced by action_buttons_area_init(), action_channel_region_init(), action_main_region_init(), buttons_main_region_init(), clip_properties_region_init(), clip_tools_region_init(), ed_default_handlers(), ED_region_panels_init(), graph_channel_region_init(), graph_main_region_init(), image_buttons_region_init(), image_main_region_init(), image_tools_region_init(), info_main_region_init(), nla_main_region_init(), blender::ed::space_node::node_buttons_region_init(), blender::ed::space_node::node_main_region_init(), blender::ed::space_node::node_toolbar_region_init(), spreadsheet_main_region_init(), spreadsheet_sidebar_init(), topbar_main_region_init(), view3d_buttons_region_init(), view3d_header_region_init(), view3d_main_region_init(), view3d_tools_region_init(), WM_event_add_keymap_handler_poll(), and wm_window_ghostwindow_ensure().
struct wmEventHandler_Keymap* WM_event_add_keymap_handler_dynamic | ( | ListBase * | handlers, |
wmEventHandler_KeymapDynamicFn * | keymap_fn, | ||
void * | user_data | ||
) |
Definition at line 4387 of file wm_event_system.cc.
References BLI_addtail(), CLOG_WARN, wmEventHandler_Keymap::dynamic, wmEventHandler_Keymap::head, wmEventHandler_KeymapDynamic::keymap_fn, LISTBASE_FOREACH, wmEventHandler::type, user_data, wmEventHandler_KeymapDynamic::user_data, WM_HANDLER_TYPE_KEYMAP, and WM_LOG_HANDLERS.
Referenced by ed_default_handlers().
struct wmEventHandler_Keymap* WM_event_add_keymap_handler_poll | ( | ListBase * | handlers, |
wmKeyMap * | keymap, | ||
EventHandlerPoll | poll | ||
) |
Definition at line 4449 of file wm_event_system.cc.
References wmEventHandler_Keymap::head, wmEventHandler::poll, and WM_event_add_keymap_handler().
Referenced by clip_preview_region_init(), ed_default_handlers(), and WM_event_add_keymap_handler_v2d_mask().
struct wmEventHandler_Keymap* WM_event_add_keymap_handler_priority | ( | ListBase * | handlers, |
wmKeyMap * | keymap, | ||
int | priority | ||
) |
struct wmEventHandler_Keymap* WM_event_add_keymap_handler_v2d_mask | ( | ListBase * | handlers, |
wmKeyMap * | keymap | ||
) |
Definition at line 4462 of file wm_event_system.cc.
References handler_region_v2d_mask_test(), and WM_event_add_keymap_handler_poll().
Referenced by action_channel_region_init(), action_main_region_init(), clip_channels_region_init(), clip_main_region_init(), clip_preview_region_init(), console_main_region_init(), file_execution_region_init(), file_header_region_init(), file_main_region_init(), file_tools_region_init(), file_ui_region_init(), graph_buttons_region_init(), graph_channel_region_init(), graph_main_region_init(), image_main_region_init(), nla_buttons_region_init(), nla_channel_region_init(), nla_main_region_init(), blender::ed::space_node::node_main_region_init(), outliner_main_region_init(), script_main_region_init(), sequencer_buttons_region_init(), sequencer_channel_region_init(), sequencer_main_region_init(), sequencer_preview_region_init(), sequencer_tools_region_init(), text_main_region_init(), and text_properties_region_init().
struct wmEventHandler_Op* WM_event_add_modal_handler | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 4181 of file wm_event_system.cc.
References wmEventHandler_Op::area, BLI_addhead(), C, wmEventHandler_Op::context, CTX_wm_area(), CTX_wm_region(), CTX_wm_window(), wmEventHandler_Op::head, wmWindow::modalhandlers, wmOperatorType::modalkeymap, wmEventHandler_Op::op, wmOperator::opm, wmEventHandler_Op::region, wmEventHandler_Op::region_type, ARegion::regiontype, wmOperator::type, wmEventHandler::type, WM_HANDLER_TYPE_OP, and WM_window_status_area_tag_redraw().
Referenced by actionzone_invoke(), add_marker_at_click_invoke(), animchannels_select_filter_invoke(), annotation_draw_invoke(), area_join_invoke(), area_move_invoke(), area_split_invoke(), area_swap_invoke(), bake_invoke(), brush_edit_invoke(), change_frame_invoke(), clip_prefetch_invoke(), console_modal_select_invoke(), curve_draw_invoke(), curve_pen_invoke(), datadropper_invoke(), depthdropper_invoke(), driverdropper_invoke(), dyntopo_detail_size_edit_invoke(), ED_imbuf_sample_invoke(), ed_marker_move_invoke(), edbm_bevel_invoke(), edbm_inset_invoke(), edbm_point_normals_invoke(), eyedropper_colorband_invoke(), eyedropper_gpencil_invoke(), eyedropper_invoke(), face_set_extract_invoke(), fluid_bake_invoke(), fly_invoke(), gizmo_tweak_invoke(), gpencil_draw_invoke(), gpencil_fill_invoke(), gpencil_interpolate_invoke(), gpencil_primitive_invoke(), gpencil_sculpt_brush_invoke(), gpencil_transform_fill_invoke(), gpencil_vertexpaint_brush_invoke(), gpencil_weightpaint_brush_invoke(), grab_clone_invoke(), graph_slider_invoke(), graphview_cursor_invoke(), image_view_pan_init(), image_view_zoom_init(), knifetool_invoke(), light_cache_bake_invoke(), lineart_gpencil_bake_common(), loopcut_init(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), minimize_stretch_invoke(), multiresbake_image_exec(), blender::ed::space_node::node_insert_offset_invoke(), blender::ed::space_node::node_link_invoke(), blender::ed::space_node::node_resize_init(), object_transform_axis_target_invoke(), op_generic_value_invoke(), outliner_item_openclose_invoke(), blender::ed::sculpt_paint::image::ops::paint::paint_invoke(), paintcurve_slide_invoke(), pose_slide_invoke_common(), poselib_blend_invoke(), poselib_preview_invoke(), ptcache_bake_invoke(), radial_control_invoke(), region_scale_invoke(), sample_color_invoke(), blender::ed::space_node::sample_invoke(), screen_opengl_render_invoke(), screen_render_invoke(), scroller_activate_invoke(), sculpt_brush_stroke_invoke(), sculpt_cloth_filter_invoke(), sculpt_color_filter_invoke(), blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(), sculpt_expand_invoke(), sculpt_mask_expand_invoke(), sculpt_mesh_filter_invoke(), sculpt_sample_detail_size_invoke(), blender::ed::sculpt_paint::select_grow::select_grow_invoke(), sequencer_slip_invoke(), slide_marker_invoke(), slide_plane_marker_invoke(), slide_point_invoke(), slide_spline_curvature_invoke(), blender::ed::space_node::snode_bg_viewmove_invoke(), solve_camera_invoke(), stencil_control_invoke(), stitch_invoke(), text_autocomplete_invoke(), text_scroll_bar_invoke(), text_scroll_invoke(), text_selection_set_invoke(), track_markers(), transform_invoke(), uv_sculpt_stroke_invoke(), view3d_interactive_add_invoke(), view_edge_pan_invoke(), view_pan_init(), view_pan_invoke(), view_zoom_init(), view_zoomdrag_invoke(), viewdolly_invoke(), viewmove_invoke(), viewroll_invoke(), viewrotate_invoke(), viewzoom_invoke(), voxel_size_edit_invoke(), vpaint_invoke(), walk_invoke(), WM_generic_select_modal(), WM_gesture_box_invoke(), WM_gesture_circle_invoke(), WM_gesture_lasso_invoke(), WM_gesture_lines_invoke(), WM_gesture_straightline_invoke(), wm_xr_navigation_fly_invoke(), wm_xr_navigation_grab_invoke(), wm_xr_navigation_teleport_invoke(), and wpaint_invoke().
Definition at line 4623 of file wm_event_system.cc.
References wmWindow::addmousemove.
Referenced by button_activate_exit(), datadropper_exit(), ED_area_newspace(), ED_area_swapspace(), ed_undo_redo_exec(), ed_undo_refresh_for_op(), ED_view3d_smooth_view_ex(), edbm_polybuild_delete_at_cursor_invoke(), edbm_polybuild_dissolve_at_cursor_invoke(), edbm_polybuild_face_at_cursor_invoke(), edbm_polybuild_split_at_cursor_invoke(), edbm_polybuild_transform_at_cursor_invoke(), edge_pan_apply_delta(), file_select_all_exec(), file_select_exec(), file_view_selected_exec(), file_walk_select_selection_set(), gizmo_arrow_modal(), gizmo_cage2d_modal(), gizmo_cage3d_modal(), poselib_blend_cleanup(), region_flip_exec(), screen_change_update(), ui_but_extra_operator_icon_apply(), ui_button_press_invoke(), ui_do_but_BLOCK(), ui_handle_menu_event(), ui_handler_region_drag_toggle(), UI_pie_menu_end(), UI_popover_end(), ui_popover_panel_create(), UI_popup_block_ex(), UI_popup_block_invoke_ex(), ui_popup_handler(), ui_popup_menu_create(), UI_popup_menu_end(), UI_view2d_edge_pan_cancel(), view2d_smoothview_invoke(), view3d_smoothview_apply_ex(), view_pan_apply_ex(), wm_drags_exit(), wm_exit_schedule_delayed(), wm_gizmomap_modal_set(), and WM_gizmomap_select_all().
void WM_event_add_notifier_ex | ( | struct wmWindowManager * | wm, |
const struct wmWindow * | win, | ||
unsigned int | type, | ||
void * | reference | ||
) |
struct wmEvent* WM_event_add_simulate | ( | struct wmWindow * | win, |
const struct wmEvent * | event_to_add | ||
) |
For testing only, see G_FLAG_EVENT_SIMULATE.
struct wmTimer* WM_event_add_timer | ( | struct wmWindowManager * | wm, |
struct wmWindow * | win, | ||
int | event_type, | ||
double | timestep | ||
) |
Definition at line 1630 of file wm_window.c.
References BLI_addtail(), BLI_assert, wmTimer::event_type, wmTimer::ltime, MEM_callocN, wmTimer::ntime, PIL_check_seconds_timer(), wmTimer::stime, wmWindowManager::timers, wmTimer::timestep, and wmTimer::win.
Referenced by button_activate_state(), ED_region_visibility_change_update_animated(), ED_screen_animation_timer(), ED_view3d_smooth_view_ex(), file_params_invoke_rename_postscroll(), gpencil_sculpt_brush_invoke(), image_view_zoom_init(), initFlyInfo(), initWalkInfo(), minimize_stretch_invoke(), blender::ed::space_node::node_insert_offset_invoke(), paint_stroke_modal(), panel_handle_data_ensure(), screen_opengl_render_invoke(), text_cursor_timer_ensure(), ui_handle_button_event(), ui_handle_menu_event(), ui_pie_handler(), UI_view2d_smooth_view(), uv_sculpt_stroke_invoke(), view_zoom_init(), view_zoomdrag_invoke(), viewzoom_invoke(), wm_autosave_timer_begin_ex(), WM_jobs_start(), WM_report_banner_show(), WM_tooltip_init(), and WM_tooltip_timer_init_ex().
struct wmTimer* WM_event_add_timer_notifier | ( | struct wmWindowManager * | wm, |
struct wmWindow * | win, | ||
unsigned int | type, | ||
double | timestep | ||
) |
Definition at line 1647 of file wm_window.c.
References BLI_addtail(), BLI_assert, wmTimer::customdata, wmTimer::event_type, wmTimer::flags, wmTimer::ltime, MEM_callocN, wmTimer::ntime, PIL_check_seconds_timer(), POINTER_FROM_UINT, wmTimer::stime, TIMERNOTIFIER, wmWindowManager::timers, wmTimer::timestep, type, wmTimer::win, and WM_TIMER_NO_FREE_CUSTOM_DATA.
Referenced by blender::ed::asset::PreviewTimer::ensureRunning(), and file_draw_list().
struct wmEventHandler_UI* WM_event_add_ui_handler | ( | const struct bContext * | C, |
ListBase * | handlers, | ||
wmUIHandlerFunc | handle_fn, | ||
wmUIHandlerRemoveFunc | remove_fn, | ||
void * | user_data, | ||
char | flag | ||
) |
int WM_event_drag_direction | ( | const wmEvent * | event | ) |
Definition at line 267 of file wm_event_query.c.
References atan2f, KM_DIRECTION_E, KM_DIRECTION_N, KM_DIRECTION_NE, KM_DIRECTION_NW, KM_DIRECTION_S, KM_DIRECTION_SE, KM_DIRECTION_SW, KM_DIRECTION_W, M_PI, and round_fl_to_int().
Referenced by wm_handlers_do().
Definition at line 288 of file wm_dragdrop.cc.
References wmDrag::imb, and wmDrag::imbuf_scale.
Referenced by ui_but_drag_start().
Definition at line 381 of file wm_event_query.c.
References KM_CLICK_DRAG, wmEvent::prev_press_xy, ARegion::winrct, rcti::xmin, xy, wmEvent::xy, and rcti::ymin.
Referenced by actkeys_box_select_invoke(), graphkeys_box_select_invoke(), initTransform(), initTransInfo(), blender::ed::space_node::is_event_over_node_or_socket(), blender::ed::space_node::node_link_invoke(), blender::ed::space_node::node_resize_invoke(), blender::ed::space_node::node_resize_modal(), outliner_box_select_invoke(), outliner_item_activate_invoke(), outliner_item_drag_drop_invoke(), outliner_item_drag_element_find(), outliner_item_openclose_invoke(), sequencer_box_select_invoke(), view3d_interactive_add_begin(), view3d_ruler_add_invoke(), WM_generic_select_invoke(), and wm_gizmomap_highlight_find().
Definition at line 388 of file wm_event_query.c.
References KM_CLICK_DRAG, wmEvent::prev_press_xy, ARegion::winrct, rcti::xmin, xy, wmEvent::xy, and rcti::ymin.
Referenced by annotation_draw_apply_event(), gizmo_ruler_invoke(), gpencil_primitive_interaction_begin(), and view3d_interactive_add_modal().
Definition at line 395 of file wm_event_query.c.
References copy_v2_v2_int(), KM_CLICK_DRAG, wmEvent::prev_press_xy, wmEvent::val, and wmEvent::xy.
Referenced by ui_list_activate_hovered_row(), ui_list_is_hovering_draggable_but(), and WM_gesture_new().
int WM_event_drag_threshold | ( | const struct wmEvent * | event | ) |
Definition at line 346 of file wm_event_query.c.
References BLI_assert, ISMOUSE_BUTTON, MOUSEMOVE, wmEvent::prev_press_type, and WM_event_is_tablet().
Referenced by ui_but_drag_init(), and WM_event_drag_test_with_delta().
void WM_event_fileselect_event | ( | struct wmWindowManager * | wm, |
void * | ophandle, | ||
int | eventval | ||
) |
Definition at line 4028 of file wm_event_system.cc.
References wmWindow::eventstate, EVT_FILESELECT, LISTBASE_FOREACH, wmEvent::type, wmWindowManager::windows, and wm_event_add().
Referenced by ED_fileselect_exit(), file_cancel_exec(), file_execute(), and WM_event_add_fileselect().
void WM_event_free_ui_handler_all | ( | struct bContext * | C, |
ListBase * | handlers, | ||
wmUIHandlerFunc | handle_fn, | ||
wmUIHandlerRemoveFunc | remove_fn | ||
) |
Definition at line 4547 of file wm_event_system.cc.
References BLI_remlink(), C, wmEventHandler_UI::handle_fn, wmEventHandler_UI::head, LISTBASE_FOREACH_MUTABLE, wmEventHandler_UI::remove_fn, wmEventHandler_UI::user_data, wm_event_free_handler(), and WM_HANDLER_TYPE_UI.
Referenced by ui_popup_handler(), and UI_popup_handlers_remove_all().
void WM_event_get_keymap_from_toolsystem | ( | struct wmWindowManager * | wm, |
struct wmWindow * | win, | ||
struct wmEventHandler_Keymap * | handler, | ||
wmEventHandler_KeymapResult * | km_result | ||
) |
Definition at line 4379 of file wm_event_system.cc.
References wm_event_get_keymap_from_toolsystem_ex().
Referenced by ed_default_handlers().
void WM_event_get_keymap_from_toolsystem_with_gizmos | ( | struct wmWindowManager * | wm, |
struct wmWindow * | win, | ||
struct wmEventHandler_Keymap * | handler, | ||
wmEventHandler_KeymapResult * | km_result | ||
) |
Definition at line 4371 of file wm_event_system.cc.
References wm_event_get_keymap_from_toolsystem_ex().
Referenced by ed_default_handlers().
void WM_event_get_keymaps_from_handler | ( | wmWindowManager * | wm, |
struct wmWindow * | win, | ||
struct wmEventHandler_Keymap * | handler, | ||
struct wmEventHandler_KeymapResult * | km_result | ||
) |
Definition at line 5680 of file wm_event_system.cc.
References BLI_assert, wmEventHandler_Keymap::dynamic, wmEventHandler_Keymap::keymap, wmEventHandler_KeymapDynamic::keymap_fn, wmEventHandler_KeymapResult::keymaps, wmEventHandler_KeymapResult::keymaps_len, and WM_keymap_active().
Referenced by menu_types_add_from_keymap_items(), WM_event_match_keymap_item_from_handlers(), wm_handlers_do_intern(), and wm_keymap_item_find_handlers().
void struct wmEvent struct wmEvent void wm_event_init_from_window | ( | struct wmWindow * | win, |
struct wmEvent * | event | ||
) |
Definition at line 244 of file wm_event_system.cc.
References wmWindow::eventstate.
Referenced by actionzone_apply(), ghost_event_proc(), ui_but_activate_event(), UI_but_focus_on_enter_event(), wm_event_handler_ui_cancel_ex(), and wm_window_timer().
bool WM_event_is_modal_drag_exit | ( | const struct wmEvent * | event, |
short | init_event_type, | ||
short | init_event_val | ||
) |
For modal callbacks, check configuration for how to interpret exit when dragging.
Definition at line 261 of file wm_event_query.c.
References ISMOUSE_BUTTON, KM_PRESS, wmEvent::type, and WM_event_is_mouse_drag().
Referenced by WM_gesture_box_invoke(), WM_gesture_circle_invoke(), and WM_gesture_straightline_invoke().
Definition at line 537 of file wm_event_query.c.
References wmTabletData::active, EVT_TABLET_NONE, and wmEvent::tablet.
Referenced by paint_stroke_modal(), and WM_event_drag_threshold().
wmKeyMapItem* WM_event_match_keymap_item | ( | struct bContext * | C, |
wmKeyMap * | keymap, | ||
const struct wmEvent * | event | ||
) |
wmKeyMapItem* WM_event_match_keymap_item_from_handlers | ( | struct bContext * | C, |
struct wmWindowManager * | wm, | ||
struct wmWindow * | win, | ||
struct ListBase * | handlers, | ||
const struct wmEvent * | event | ||
) |
void WM_event_modal_handler_area_replace | ( | wmWindow * | win, |
const struct ScrArea * | old_area, | ||
struct ScrArea * | new_area | ||
) |
Modal handlers store a pointer to an area which might be freed while the handler runs. Use this function to NULL all handler pointers to old_area.
void WM_event_modal_handler_region_replace | ( | wmWindow * | win, |
const struct ARegion * | old_region, | ||
struct ARegion * | new_region | ||
) |
Modal handlers store a pointer to a region which might be freed while the handler runs. Use this function to NULL all handler pointers to old_region.
For debugging only, getting inspecting events manually is tedious.
Definition at line 4586 of file wm_event_system.cc.
References blender::compositor::area(), wmEventHandler_UI::area, BLI_remlink(), wmEventHandler_UI::context, LISTBASE_FOREACH_MUTABLE, wm_event_free_handler(), and WM_HANDLER_TYPE_UI.
Referenced by screen_change_prepare().
Called on exit or remove area, only here call cancel callback.
Definition at line 1996 of file wm_event_system.cc.
References blender::compositor::area(), wmEventHandler_UI::area, BLI_assert, BLI_pophead(), C, wmOperatorType::cancel, wmEventHandler_UI::context, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_menu(), CTX_wm_menu_set(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_window(), ED_area_exit(), ED_fileselect_handler_area_find(), wmWindow::eventstate, wmOperatorType::flag, wmEventHandler_Op::is_fileselect, LISTBASE_FOREACH, wmEventHandler_UI::menu, wmEventHandler_Op::op, wmWindowManager::op_undo_depth, OPTYPE_UNDO, wmEventHandler_UI::region, wmEventHandler_UI::remove_fn, wmOperator::type, wmEventHandler::type, wmEventHandler_UI::user_data, wmWindowManager::windows, WM_cursor_grab_disable(), wm_event_free_handler(), wm_handler_op_context(), WM_HANDLER_TYPE_OP, WM_HANDLER_TYPE_UI, WM_operator_free(), and wm_operator_free_for_fileselect().
Referenced by clip_set_region_visible(), ED_area_exit(), ED_region_exit(), ED_region_visibility_change_update(), ED_region_visibility_change_update_animated(), sequencer_refresh(), WM_exit_ex(), wm_window_close(), wm_window_free(), and wm_window_match_init().
Definition at line 4467 of file wm_event_system.cc.
References BLI_remlink(), wmEventHandler_Keymap::head, wmEventHandler_Keymap::keymap, LISTBASE_FOREACH, wm_event_free_handler(), and WM_HANDLER_TYPE_KEYMAP.
Referenced by ui_block_free_func_POPOVER(), and WM_event_add_keymap_handler_priority().
void WM_event_remove_timer | ( | struct wmWindowManager * | wm, |
struct wmWindow * | win, | ||
struct wmTimer * | timer | ||
) |
Mark the given timer
to be removed, actual removal and deletion is deferred and handled internally by the window manager code.
void WM_event_remove_timer_notifier | ( | struct wmWindowManager * | wm, |
struct wmWindow * | win, | ||
struct wmTimer * | timer | ||
) |
Definition at line 1713 of file wm_window.c.
References wmTimer::customdata, NULL, and WM_event_remove_timer().
Referenced by file_draw_list(), file_exit(), file_refresh(), and blender::ed::asset::PreviewTimer::stop().
void WM_event_remove_ui_handler | ( | ListBase * | handlers, |
wmUIHandlerFunc | handle_fn, | ||
wmUIHandlerRemoveFunc | remove_fn, | ||
void * | user_data, | ||
bool | postpone | ||
) |
postpone | Enable for win->modalhandlers , this is in a running for () loop in wm_handlers_do(). |
Definition at line 4522 of file wm_event_system.cc.
References BLI_remlink(), wmEventHandler::flag, wmEventHandler_UI::handle_fn, wmEventHandler_UI::head, LISTBASE_FOREACH, wmEventHandler_UI::remove_fn, user_data, wmEventHandler_UI::user_data, wm_event_free_handler(), WM_HANDLER_DO_FREE, and WM_HANDLER_TYPE_UI.
Referenced by button_activate_state(), panel_activate_state(), ui_handler_region_drag_toggle(), ui_handler_wait_for_input(), ui_panel_drag_collapse_handler(), UI_popup_handlers_remove(), and UI_region_handlers_add().
void WM_event_set_keymap_handler_post_callback | ( | struct wmEventHandler_Keymap * | handler, |
void(keymap_tag)(wmKeyMap *keymap, wmKeyMapItem *kmi, void *user_data) | , | ||
void * | user_data | ||
) |
Definition at line 4481 of file wm_event_system.cc.
References wmEventHandler_Keymap::post, wmEventHandler_KeymapPost::post_fn, user_data, and wmEventHandler_KeymapPost::user_data.
Referenced by UI_popover_end().
void WM_event_start_drag | ( | struct bContext * | C, |
int | icon, | ||
int | type, | ||
void * | poin, | ||
double | value, | ||
unsigned int | flags | ||
) |
Start dragging immediately with the given data. Note that poin should be valid allocated and not on stack.
Definition at line 237 of file wm_dragdrop.cc.
References C, type, WM_drag_data_create(), and WM_event_start_prepared_drag().
Referenced by blender::ui::ViewItemAPIWrapper::drag_start(), ghost_event_proc(), ui_but_drag_init(), and ui_but_drag_start().
Invoke dragging using the given drag data.
Definition at line 229 of file wm_dragdrop.cc.
References BLI_addtail(), C, CTX_wm_manager(), wmWindowManager::drags, and wm_dropbox_invoke().
Referenced by outliner_item_drag_drop_invoke(), ui_but_drag_start(), and WM_event_start_drag().
If this is a tablet event, return tablet pressure and set *pen_flip
to 1 if the eraser tool is being used, 0 otherwise.
void WM_event_tablet_data_default_set | ( | struct wmTabletData * | tablet_data | ) |
Definition at line 4896 of file wm_event_system.cc.
References wm_event_tablet_data_default().
void WM_event_timer_sleep | ( | struct wmWindowManager * | wm, |
struct wmWindow * | win, | ||
struct wmTimer * | timer, | ||
bool | do_sleep | ||
) |
To (de)activate running timers temporary.
char WM_event_utf8_to_ascii | ( | const struct wmEvent * | event | ) |
Definition at line 406 of file wm_event_query.c.
References BLI_str_utf8_size(), and wmEvent::utf8_buf.
Referenced by handleNumInput(), poselib_preview_handle_event(), and text_line_number_invoke().
Main exit function to close Blender ordinarily.
Definition at line 646 of file wm_init_exit.c.
References C, G, G_DEBUG, and WM_exit_ex().
Referenced by arg_handle_load_file(), main(), and wm_exit_handler().
Definition at line 434 of file wm_init_exit.c.
References ANIM_driver_vars_copybuf_free(), ANIM_drivers_copybuf_free(), ANIM_fcurves_copybuf_free(), ANIM_fmodifiers_copybuf_free(), ANIM_keyingset_infos_exit(), BKE_addon_pref_type_free(), BKE_appdir_exit(), BKE_blender_atexit(), BKE_blender_free(), BKE_blender_userdef_data_free(), BKE_blendfile_userdef_write_all(), BKE_image_free_unused_gpu_textures(), BKE_keyconfig_pref_type_free(), BKE_mask_clipboard_free(), BKE_materials_exit(), BKE_mball_cubeTable_free(), BKE_node_clipboard_free(), BKE_sound_exit(), BKE_subdiv_exit(), BKE_tempdir_base(), BKE_tempdir_session_purge(), BKE_tracking_clipboard_free(), BKE_vfont_clipboard_free(), BLENDER_QUIT_FILE, BLF_exit(), BLI_join_dirfile(), BLI_task_scheduler_exit(), BLI_threadapi_exit(), BLI_timer_free(), BLO_memfile_write_file(), BLO_write_file(), BLT_lang_free(), BPY_python_end(), BPY_run_string_eval(), C, CLG_exit(), COM_deinitialize(), CTX_data_main(), CTX_free(), CTX_py_init_get(), CTX_wm_manager(), CTX_wm_window_set(), DNA_sdna_current_free(), DRW_opengl_context_destroy(), DRW_opengl_context_disable_ex(), DRW_opengl_context_enable_ex(), DRW_subdiv_free(), ED_assetlist_storage_exit(), ED_editors_exit(), ED_editors_flush_edits(), ED_file_exit(), ED_gpencil_anim_copybuf_free(), ED_gpencil_strokes_copybuf_free(), ED_preview_free_dbase(), ED_preview_restart_queue_free(), ED_screen_exit(), ED_undosys_stack_memfile_get_active(), ED_undosys_type_free(), FILE_MAX, free_openrecent(), G, G_FILE_COMPRESS, G_FLAG_USERPREF_NO_SAVE_ON_EXIT, GHOST_DisposeSystemPaths(), GPU_exit(), GPU_pass_cache_free(), LISTBASE_FOREACH, NULL, opengl_is_init, RE_engines_exit(), RE_FreeAllRender(), RNA_exit(), SEQ_clipboard_free(), UI_exit(), wmWindowManager::undo_stack, USER_PREF_FLAG_SAVE, void, wmWindowManager::windows, wm_autosave_delete(), wm_dropbox_free(), WM_event_remove_handlers(), wm_free_reports(), wm_ghost_exit(), wm_gizmogrouptype_free(), wm_gizmomaptypes_free(), wm_gizmotype_free(), WM_jobs_kill_all(), WM_menutype_free(), wm_operatortype_free(), WM_paneltype_clear(), wm_surfaces_free(), wm_test_autorun_revert_action_set(), WM_uilisttype_free(), and WM_window_get_active_screen().
Referenced by bpy_atexit(), and WM_exit().
struct ID* WM_file_append_datablock | ( | struct Main * | bmain, |
struct Scene * | scene, | ||
struct ViewLayer * | view_layer, | ||
struct View3D * | v3d, | ||
const char * | filepath, | ||
short | id_code, | ||
const char * | id_name, | ||
int | flag | ||
) |
scene
(and related view_layer
and v3d
) pointers may be NULL, in which case no instantiation of appended objects, collections etc. will be performed. Definition at line 554 of file wm_files_link.c.
References BLI_assert, FILE_LINK, id, id_name(), scene, and wm_file_link_append_datablock_ex().
Referenced by WM_drag_asset_id_import(), and workspace_append_activate_exec().
void WM_file_autoexec_init | ( | const char * | filepath | ) |
Definition at line 559 of file wm_files.c.
References BKE_autoexec_match(), BLI_split_dir_part(), FILE_MAX, G, G_FLAG_SCRIPT_AUTOEXEC, and G_FLAG_SCRIPT_OVERRIDE_PREF.
Referenced by arg_handle_load_file(), and wm_file_read_opwrap().
void WM_file_autosave_init | ( | struct wmWindowManager * | wm | ) |
Definition at line 1984 of file wm_files.c.
References wm_autosave_timer_begin().
Referenced by WM_check().
struct ID* WM_file_link_datablock | ( | struct Main * | bmain, |
struct Scene * | scene, | ||
struct ViewLayer * | view_layer, | ||
struct View3D * | v3d, | ||
const char * | filepath, | ||
short | id_code, | ||
const char * | id_name, | ||
int | flag | ||
) |
scene
(and related view_layer
and v3d
) pointers may be NULL, in which case no instantiation of linked objects, collections etc. will be performed. Definition at line 540 of file wm_files_link.c.
References FILE_LINK, id_name(), scene, and wm_file_link_append_datablock_ex().
Referenced by WM_drag_asset_id_import().
bool WM_file_read | ( | struct bContext * | C, |
const char * | filepath, | ||
struct ReportList * | reports | ||
) |
Definition at line 900 of file wm_files.c.
References BKE_blendfile_read(), BKE_blendfile_read_setup(), BKE_main_namemap_validate(), BKE_READ_EXOTIC_FAIL_FORMAT, BKE_READ_EXOTIC_FAIL_OPEN, BKE_READ_EXOTIC_FAIL_PATH, BKE_READ_EXOTIC_OK_BLEND, BKE_reportf(), BLI_assert, BLI_assert_msg, BLO_READ_SKIP_USERDEF, C, CTX_data_main(), CTX_wm_manager(), BlendFileReadReport::duration, file_read_reports_finalize(), BlendFileData::filepath, G, G_FLAG_ALL_READFILE, G_FLAG_ALL_RUNTIME, NULL, wmWindowManager::op_undo_depth, params, PIL_check_seconds_timer(), BlendFileReadReport::reports, RPT_ERROR, TIP_, BlendFileReadReport::whole, Main::wm, WM_check(), WM_cursor_wait(), wm_file_history_find(), wm_file_read_post(), wm_file_read_pre(), wm_history_file_free(), wm_history_file_update(), wm_history_file_write(), wm_read_exotic(), wm_window_match_do(), and wm_window_match_init().
Referenced by arg_handle_load_file(), and wm_file_read_opwrap().
bool WM_file_recover_last_session | ( | struct bContext * | C, |
struct ReportList * | reports | ||
) |
Definition at line 2883 of file wm_files.c.
References BKE_tempdir_base(), BLENDER_QUIT_FILE, BLI_join_dirfile(), C, FILE_MAX, G, G_FILE_RECOVER_READ, and wm_file_read_opwrap().
Referenced by wm_recover_last_session_exec().
Definition at line 150 of file wm_files.c.
References wmWindowManager::file_saved, G_MAIN, NC_WM, ND_DATACHANGED, NULL, and WM_main_add_notifier().
Referenced by ED_image_undo_push_end(), ED_paintcurve_undo_push_end(), ED_undo_push(), and SCULPT_undo_push_end_ex().
void WM_generic_callback_free | ( | struct wmGenericCallback * | callback | ) |
Definition at line 18 of file wm_utils.c.
References callback, and MEM_freeN.
Referenced by free_post_file_close_action(), save_file_forwardcompat_overwrite(), wm_block_file_close_discard(), wm_block_file_close_save(), and wm_close_file_dialog().
struct wmGenericCallback* WM_generic_callback_steal | ( | struct wmGenericCallback * | callback | ) |
Definition at line 30 of file wm_utils.c.
References callback, do_nothing(), MEM_dupallocN, and NULL.
Referenced by save_file_forwardcompat_overwrite(), wm_block_file_close_discard(), and wm_block_file_close_save().
int WM_generic_select_invoke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
Helper to get select and tweak-transform to work conflict free and as desired. See WM_operator_properties_generic_select() for details.
To be used together with WM_generic_select_modal() and WM_operator_properties_generic_select().
int WM_generic_select_modal | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
Helper to get select and tweak-transform to work conflict free and as desired. See WM_operator_properties_generic_select() for details.
To be used together with WM_generic_select_invoke() and WM_operator_properties_generic_select().
void WM_generic_user_data_free | ( | struct wmGenericUserData * | wm_userdata | ) |
Definition at line 45 of file wm_utils.c.
References wmGenericUserData::data, wmGenericUserData::free_fn, MEM_freeN, and wmGenericUserData::use_free.
Referenced by view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select(), and WM_gesture_end().
void WM_gesture_box_cancel | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 268 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by ACTION_OT_select_box(), ANIM_OT_channels_select_box(), ANIM_OT_previewrange_set(), FILE_OT_select_box(), GPENCIL_OT_select_box(), GRAPH_OT_select_box(), IMAGE_OT_render_border(), IMAGE_OT_view_zoom_border(), INFO_OT_select_box(), MARKER_OT_select_box(), NLA_OT_select_box(), blender::ed::space_node::NODE_OT_select_box(), blender::ed::space_node::NODE_OT_viewer_border(), OUTLINER_OT_select_box(), SEQUENCER_OT_select_box(), SEQUENCER_OT_view_ghost_border(), UV_OT_select_box(), VIEW2D_OT_zoom_border(), VIEW3D_OT_clip_border(), VIEW3D_OT_render_border(), VIEW3D_OT_select_box(), and VIEW3D_OT_zoom_border().
int WM_gesture_box_invoke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
int WM_gesture_box_modal | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
void WM_gesture_circle_cancel | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 449 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by ACTION_OT_select_circle(), GPENCIL_OT_select_circle(), GRAPH_OT_select_circle(), UV_OT_select_circle(), and view3d_circle_select_cancel().
int WM_gesture_circle_invoke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
int WM_gesture_circle_modal | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
Definition at line 86 of file wm_gesture.c.
References BLI_remlink(), wmGesture::customdata, wmWindow::gesture, MEM_freeN, wmGesture::user_data, and WM_generic_user_data_free().
Referenced by gesture_modal_end(), WM_gestures_free_all(), and WM_gestures_remove().
void WM_gesture_lasso_cancel | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 615 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by ACTION_OT_select_lasso(), CLIP_OT_select_lasso(), GPENCIL_OT_select_lasso(), GPENCIL_OT_stroke_cutter(), GRAPH_OT_select_lasso(), MASK_OT_select_lasso(), blender::ed::space_node::NODE_OT_select_lasso(), UV_OT_select_lasso(), and VIEW3D_OT_select_lasso().
int WM_gesture_lasso_invoke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
int WM_gesture_lasso_modal | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
const int(* WM_gesture_lasso_path_to_array | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
int * | mcoords_len | ||
) | )[2] |
helper function, we may want to add options for conversion to view space
caller must free.
void WM_gesture_lines_cancel | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 620 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by blender::ed::space_node::NODE_OT_add_reroute(), blender::ed::space_node::NODE_OT_links_cut(), and blender::ed::space_node::NODE_OT_links_mute().
int WM_gesture_lines_invoke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
int WM_gesture_lines_modal | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
struct wmGesture* WM_gesture_new | ( | struct wmWindow * | window, |
const struct ARegion * | region, | ||
const struct wmEvent * | event, | ||
int | type | ||
) |
Context checked on having screen, window and area.
int WM_gesture_straightline_active_side_invoke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
This invoke callback starts the straight-line gesture with a viewport preview to the right side of the line.
void WM_gesture_straightline_cancel | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 956 of file wm_gesture_ops.c.
References C, and gesture_modal_end().
Referenced by IMAGE_OT_sample_line(), MESH_OT_bisect(), PAINT_OT_weight_gradient(), and paint_weight_gradient_modal().
int WM_gesture_straightline_invoke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
int WM_gesture_straightline_modal | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
This modal callback calls exec once per mouse move event while the gesture is active with the updated line start and end values, so it can be used for tools that have a real time preview (like a gradient updating in real time over the mesh).
int WM_gesture_straightline_oneshot_modal | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
This modal one-shot callback only calls exec once after the gesture finishes without any updates during the gesture execution. Should be used for operations that are intended to be applied once without real time preview (like a trimming tool that only applies the bisect operation once after finishing the gesture as the bisect operation is too heavy to be computed in real time for a preview).
Definition at line 94 of file wm_gesture.c.
References ListBase::first, wmWindow::gesture, and WM_gesture_end().
Referenced by wm_window_free().
Definition at line 101 of file wm_gesture.c.
References ListBase::first, wmWindow::gesture, and WM_gesture_end().
Referenced by ui_but_drag_init().
Initialize Blender and load the startup file & preferences (only called once).
NOTE(@campbellbarton): Startup file and order of initialization.
Loading BLENDER_STARTUP_FILE, BLENDER_USERPREF_FILE, starting Python and other sub-systems, have inter-dependencies, for example.
Loading preferences early, then application subsystems and finally the startup data would simplify things if it weren't for key-maps being part of the window-manager which is blend file data. Creating a dummy window-manager early, or moving the key-maps into the preferences would resolve this and may be worth looking into long-term, see: D12184 for details.
Definition at line 212 of file wm_init_exit.c.
References BIFICONID_LAST, BKE_addon_pref_type_init(), BKE_icons_init(), BKE_keyconfig_pref_type_init(), BKE_library_callback_free_notifier_reference_set(), BKE_library_callback_remap_editor_id_reference_set(), BKE_main_blendfile_path_from_global(), BKE_material_copybuf_clear(), BKE_region_callback_free_gizmomap_set(), BKE_region_callback_refresh_tag_gizmomap_set(), BKE_sound_jack_sync_callback_set(), BKE_spacedata_callback_id_remap_set(), BKE_studiolight_init(), BKE_subdiv_init(), BLF_init(), BLI_assert, BLI_strncpy(), BLT_lang_init(), BLT_lang_set(), BPY_python_reset(), BPY_python_start(), C, DEG_editors_set_update_cb(), ED_file_init(), ED_node_init_butfuncs(), ED_render_clear_mtex_copybuf(), ED_render_id_flush_update(), ED_render_scene_update(), ED_spacedata_id_remap_single(), ED_spacemacros_init(), ED_spacetypes_init(), ED_undosys_type_init(), G, G_FILE_NO_UI, G_MAIN, GHOST_CreateSystemPaths(), GHOST_kConsoleWindowStateHideForNonConsoleLaunch, GHOST_kConsoleWindowStateShow, GHOST_setConsoleWindowState(), GPU_context_active_get(), GPU_context_begin_frame(), GPU_context_end_frame(), GPU_render_begin(), GPU_render_end(), IMB_thumb_clear_translations(), NULL, sound_jack_sync_callback(), UI_init(), UNUSED_VARS, wm_ghost_init(), wm_gizmogrouptype_init(), wm_gizmomap_remove(), WM_gizmomap_tag_refresh(), wm_gizmotype_init(), wm_history_file_read(), wm_homefile_read_ex(), wm_homefile_read_post(), wm_init_cursor_data(), WM_init_opengl(), wm_init_reports(), WM_init_state_app_template_get(), WM_main_remap_editor_id_reference(), WM_main_remove_notifier_reference(), WM_menutype_init(), WM_msgbus_types_init(), wm_operatortype_init(), wm_operatortypes_register(), WM_paneltype_init(), WM_platform_support_perform_checks(), wm_start_with_console, and WM_uilisttype_init().
Referenced by main().
Definition at line 2034 of file wm_window.c.
References g_system, GHOST_kTabletAutomatic, GHOST_kTabletWinPointer, GHOST_kTabletWintab, GHOST_SetMultitouchGestures(), GHOST_SetTabletAPI(), USER_NO_MULTITOUCH_GESTURES, USER_TABLET_AUTOMATIC, USER_TABLET_NATIVE, and USER_TABLET_WINTAB.
Referenced by wm_init_userdef().
Definition at line 2023 of file wm_window.c.
References WMInitStruct::native_pixels, and wm_init_state.
Referenced by arg_handle_native_pixels_set().
Definition at line 162 of file wm_init_exit.c.
References BLI_assert, DRW_opengl_context_create(), G, GPU_backend_supported(), GPU_init(), GPU_pass_cache_init(), NULL, opengl_is_init, and wm_ghost_init().
Referenced by DRW_opengl_context_enable(), DRW_render_context_enable(), and WM_init().
Definition at line 366 of file wm_init_exit.c.
References C, CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), ListBase::first, NULL, USER_SPLASH_DISABLE, wmWindowManager::windows, WM_OP_INVOKE_DEFAULT, and WM_operator_name_call().
Referenced by main(), and wm_homefile_read_exec().
const char* WM_init_state_app_template_get | ( | void | ) |
Definition at line 1037 of file wm_files.c.
References NULL, and wm_init_state_app_template.
Referenced by wm_homefile_read_exec(), WM_init(), and wm_userpref_read_exec().
void WM_init_state_app_template_set | ( | const char * | app_template | ) |
Used for setting app-template from the command line:
Definition at line 1025 of file wm_files.c.
References app_template, STRNCPY, and wm_init_state_app_template.
Referenced by arg_handle_app_template(), and wm_homefile_read_exec().
For border-less and border windows set from command-line.
Definition at line 2000 of file wm_window.c.
References GHOST_kWindowStateFullScreen, WMInitStruct::override_flag, WIN_OVERRIDE_WINSTATE, WMInitStruct::windowstate, and wm_init_state.
Referenced by arg_handle_without_borders().
Definition at line 2012 of file wm_window.c.
References GHOST_kWindowStateMaximized, WMInitStruct::override_flag, WIN_OVERRIDE_WINSTATE, WMInitStruct::windowstate, and wm_init_state.
Referenced by arg_handle_window_maximized().
Definition at line 2006 of file wm_window.c.
References GHOST_kWindowStateNormal, WMInitStruct::override_flag, WIN_OVERRIDE_WINSTATE, WMInitStruct::windowstate, and wm_init_state.
Referenced by arg_handle_with_borders().
void WM_init_state_size_set | ( | int | stax, |
int | stay, | ||
int | sizx, | ||
int | sizy | ||
) |
Called when no ghost system was initialized.
Definition at line 1991 of file wm_window.c.
References WMInitStruct::override_flag, WMInitStruct::size_x, WMInitStruct::size_y, WMInitStruct::start_x, WMInitStruct::start_y, WIN_OVERRIDE_GEOM, and wm_init_state.
Referenced by arg_handle_window_geometry().
Definition at line 148 of file wm_init_exit.c.
References wm_start_with_console.
Referenced by arg_handle_start_with_console().
Definition at line 2018 of file wm_window.c.
References WMInitStruct::window_focus, and wm_init_state.
Referenced by arg_handle_no_window_focus().
Definition at line 134 of file wm_jobs.c.
References BLI_ticket_mutex_lock(), and wmJob::main_thread_mutex.
Referenced by WM_jobs_get(), wm_jobs_kill_job(), and wm_jobs_timer().
Definition at line 139 of file wm_jobs.c.
References BLI_ticket_mutex_unlock(), and wmJob::main_thread_mutex.
Referenced by wm_job_free(), wm_jobs_kill_job(), and wm_jobs_timer().
void WM_jobs_callbacks | ( | struct wmJob * | wm_job, |
wm_jobs_start_callback | startjob, | ||
void(*)(void *) | initjob, | ||
void(*)(void *) | update, | ||
void(*)(void *) | endjob | ||
) |
Definition at line 351 of file wm_jobs.c.
References wmJob::endjob, wmJob::initjob, NULL, wmJob::startjob, update(), and WM_jobs_callbacks_ex().
Referenced by ABC_export(), ABC_import(), clip_rebuild_proxy_exec(), clip_start_prefetch_job(), drw_deferred_shader_add(), dynamicpaint_bake_exec(), ED_preview_icon_job(), ED_preview_shader_job(), ED_seq_proxy_job_get(), EEVEE_lightbake_job_create(), PreviewLoadJob::ensure_job(), filelist_readjob_start(), fluid_bake_invoke(), fluid_free_exec(), fsmenu_bookmark_validate_job_start(), gpencil_trace_image_exec(), lineart_gpencil_bake_common(), multiresbake_image_exec(), ocean_bake_exec(), ptcache_bake_invoke(), quadriflow_remesh_exec(), screen_render_invoke(), sequencer_preview_add_sound(), sequencer_thumbnail_init_job(), solve_camera_invoke(), start_audio_video_job(), track_markers(), ui_icon_ensure_deferred(), USD_export(), and USD_import().
void WM_jobs_callbacks_ex | ( | wmJob * | wm_job, |
wm_jobs_start_callback | startjob, | ||
void(*)(void *) | initjob, | ||
void(*)(void *) | update, | ||
void(*)(void *) | endjob, | ||
void(*)(void *) | completed, | ||
void(*)(void *) | canceled | ||
) |
Definition at line 360 of file wm_jobs.c.
References wmJob::canceled, wmJob::completed, wmJob::endjob, wmJob::initjob, wmJob::startjob, update(), and wmJob::update.
Referenced by bake_invoke(), ED_node_composite_job(), and WM_jobs_callbacks().
void* WM_jobs_customdata_from_type | ( | struct wmWindowManager * | wm, |
const void * | owner, | ||
int | job_type | ||
) |
Definition at line 293 of file wm_jobs.c.
References wmJob::job_type, NULL, wmJob::owner, wm_job_find(), and WM_jobs_customdata_get().
Referenced by DRW_deferred_shader_remove(), ED_preview_draw(), ED_render_job_get_current_scene(), and ED_render_job_get_scene().
Definition at line 315 of file wm_jobs.c.
References wmJob::customdata, and wmJob::run_customdata.
Referenced by drw_deferred_shader_add(), ED_preview_icon_job(), ED_seq_proxy_job_get(), EEVEE_lightbake_job_create(), PreviewLoadJob::ensure_job(), sequencer_preview_add_sound(), sequencer_thumbnail_init_job(), and WM_jobs_customdata_from_type().
Definition at line 323 of file wm_jobs.c.
References wmJob::customdata, free(), wmJob::free, wmJob::running, and wmJob::stop.
Referenced by ABC_export(), ABC_import(), bake_invoke(), clip_rebuild_proxy_exec(), clip_start_prefetch_job(), drw_deferred_shader_add(), dynamicpaint_bake_exec(), ED_node_composite_job(), ED_preview_icon_job(), ED_preview_shader_job(), ED_seq_proxy_job_get(), EEVEE_lightbake_job_create(), PreviewLoadJob::ensure_job(), filelist_readjob_start(), fluid_bake_invoke(), fluid_free_exec(), fsmenu_bookmark_validate_job_start(), gpencil_trace_image_exec(), lineart_gpencil_bake_common(), multiresbake_image_exec(), ocean_bake_exec(), ptcache_bake_invoke(), quadriflow_remesh_exec(), screen_render_invoke(), sequencer_preview_add_sound(), sequencer_thumbnail_init_job(), solve_camera_invoke(), start_audio_video_job(), track_markers(), ui_icon_ensure_deferred(), USD_export(), and USD_import().
Definition at line 346 of file wm_jobs.c.
References wmJob::start_delay_time.
Referenced by drw_deferred_shader_add(), ED_preview_icon_job(), and screen_render_invoke().
struct wmJob* WM_jobs_get | ( | struct wmWindowManager * | wm, |
struct wmWindow * | win, | ||
const void * | owner, | ||
const char * | name, | ||
int | flag, | ||
int | job_type | ||
) |
Definition at line 184 of file wm_jobs.c.
References BLI_addtail(), BLI_assert, BLI_strncpy(), BLI_ticket_mutex_alloc(), wmJob::flag, wmJob::job_type, wmWindowManager::jobs, wmJob::main_thread_mutex, MEM_callocN, wmJob::name, NULL, wmJob::owner, wmJob::win, wm_job_find(), WM_job_main_thread_lock_acquire(), and WM_JOB_TYPE_ANY.
Referenced by ABC_export(), ABC_import(), bake_invoke(), clip_rebuild_proxy_exec(), clip_start_prefetch_job(), drw_deferred_shader_add(), dynamicpaint_bake_exec(), ED_node_composite_job(), ED_preview_icon_job(), ED_preview_shader_job(), ED_seq_proxy_wm_job_get(), EEVEE_lightbake_job_create(), PreviewLoadJob::ensure_job(), filelist_readjob_start(), fluid_bake_invoke(), fluid_free_exec(), fsmenu_bookmark_validate_job_start(), gpencil_trace_image_exec(), lineart_gpencil_bake_common(), multiresbake_image_exec(), ocean_bake_exec(), ptcache_bake_invoke(), quadriflow_remesh_exec(), screen_render_invoke(), sequencer_preview_add_sound(), sequencer_thumbnail_init_job(), solve_camera_invoke(), start_audio_video_job(), track_markers(), ui_icon_ensure_deferred(), USD_export(), and USD_import().
bool WM_jobs_has_running | ( | const struct wmWindowManager * | wm | ) |
bool WM_jobs_has_running_type | ( | const struct wmWindowManager * | wm, |
int | job_type | ||
) |
Definition at line 710 of file wm_jobs.c.
References wmJob::job_type, wmWindowManager::jobs, LISTBASE_FOREACH, and wmJob::running.
Referenced by bpy_app_is_job_running().
bool WM_jobs_is_stopped | ( | const wmWindowManager * | wm, |
const void * | owner | ||
) |
Definition at line 309 of file wm_jobs.c.
References wmJob::owner, wmJob::stop, wm_job_find(), and WM_JOB_TYPE_ANY.
Referenced by uiTemplateRunningJobs().
void WM_jobs_kill | ( | struct wmWindowManager * | wm, |
void * | owner, | ||
void(*)(void *, short int *, short int *, float *) | startjob | ||
) |
Actually terminate thread and job timer.
Definition at line 594 of file wm_jobs.c.
References wmWindowManager::jobs, LISTBASE_FOREACH_MUTABLE, wmJob::owner, wmJob::startjob, and wm_jobs_kill_job().
Referenced by ED_preview_kill_jobs().
void WM_jobs_kill_all | ( | struct wmWindowManager * | wm | ) |
Wait until every job ended.
Definition at line 551 of file wm_jobs.c.
References ListBase::first, wmWindowManager::jobs, SEQ_prefetch_stop_all(), and wm_jobs_kill_job().
Referenced by ed_undo_step_pre(), WM_exit_ex(), and wm_window_match_init().
void WM_jobs_kill_all_except | ( | struct wmWindowManager * | wm, |
const void * | owner | ||
) |
Wait until every job ended, except for one owner (used in undo to keep screen job alive).
Definition at line 563 of file wm_jobs.c.
References wmWindowManager::jobs, LISTBASE_FOREACH_MUTABLE, wmJob::owner, and wm_jobs_kill_job().
Referenced by screen_opengl_render_init(), and screen_render_invoke().
void WM_jobs_kill_type | ( | struct wmWindowManager * | wm, |
const void * | owner, | ||
int | job_type | ||
) |
Definition at line 572 of file wm_jobs.c.
References ELEM, wmJob::job_type, wmWindowManager::jobs, LISTBASE_FOREACH_MUTABLE, wmJob::owner, WM_JOB_TYPE_ANY, and wm_jobs_kill_job().
Referenced by ED_scene_delete(), ED_view3d_stop_render_preview(), filelist_readjob_stop(), fsmenu_bookmark_validate_job_stop(), light_cache_bake_cancel(), light_cache_free_exec(), ptcache_bake_cancel(), reload_exec(), screen_render_cancel(), sequencer_stop_running_jobs(), and ui_studiolight_kill_icon_preview_job().
const char* WM_jobs_name | ( | const struct wmWindowManager * | wm, |
const void * | owner | ||
) |
float WM_jobs_progress | ( | const struct wmWindowManager * | wm, |
const void * | owner | ||
) |
void WM_jobs_start | ( | struct wmWindowManager * | wm, |
struct wmJob * | wm_job | ||
) |
If job running, the same owner gave it a new job. if different owner starts existing startjob, it suspends itself
Definition at line 437 of file wm_jobs.c.
References BLI_threadpool_init(), BLI_threadpool_insert(), wmJob::customdata, do_job_thread(), wmJob::free, wmJob::initjob, NULL, PIL_check_seconds_timer(), wmJob::progress, wmJob::ready, wmJob::run_customdata, wmJob::run_free, wmJob::running, wmJob::start_delay_time, wmJob::start_time, wmJob::startjob, wmJob::stop, wmJob::suspended, wmJob::threads, TIMERJOBS, wmJob::timestep, wmTimer::timestep, wmJob::win, WM_event_add_timer(), WM_event_remove_timer(), wm_jobs_test_suspend_stop(), and wmJob::wt.
Referenced by ABC_export(), ABC_import(), bake_invoke(), clip_rebuild_proxy_exec(), clip_start_prefetch_job(), drw_deferred_shader_add(), dynamicpaint_bake_exec(), ED_node_composite_job(), ED_preview_icon_job(), ED_preview_shader_job(), PreviewLoadJob::ensure_job(), filelist_readjob_start(), fluid_bake_invoke(), fluid_free_exec(), fsmenu_bookmark_validate_job_start(), gpencil_trace_image_exec(), light_cache_bake_invoke(), lineart_gpencil_bake_common(), multiresbake_image_exec(), ocean_bake_exec(), ptcache_bake_invoke(), quadriflow_remesh_exec(), screen_render_invoke(), seq_build_proxy(), seq_proxy_build_job(), sequencer_preview_add_sound(), sequencer_thumbnail_init_job(), solve_camera_invoke(), start_audio_video_job(), track_markers(), ui_icon_ensure_deferred(), USD_export(), USD_import(), and wm_jobs_timer().
double WM_jobs_starttime | ( | const struct wmWindowManager * | wm, |
const void * | owner | ||
) |
Time that job started.
void WM_jobs_stop | ( | struct wmWindowManager * | wm, |
const void * | owner, | ||
void * | startjob | ||
) |
Signal job(s) from this owner or callback to stop, timer is required to get handled.
Definition at line 583 of file wm_jobs.c.
References wmWindowManager::jobs, LISTBASE_FOREACH, wmJob::owner, wmJob::running, wmJob::startjob, and wmJob::stop.
Referenced by do_running_jobs(), and sequencer_thumbnail_start_job_if_necessary().
bool WM_jobs_test | ( | const struct wmWindowManager * | wm, |
const void * | owner, | ||
int | job_type | ||
) |
Returns true if job runs, for UI (progress) indicators.
void WM_jobs_timer | ( | struct wmJob * | wm_job, |
double | timestep, | ||
unsigned int | note, | ||
unsigned int | endnote | ||
) |
Definition at line 339 of file wm_jobs.c.
References wmJob::endnote, wmJob::note, and wmJob::timestep.
Referenced by ABC_export(), ABC_import(), bake_invoke(), clip_rebuild_proxy_exec(), clip_start_prefetch_job(), drw_deferred_shader_add(), dynamicpaint_bake_exec(), ED_node_composite_job(), ED_preview_icon_job(), ED_preview_shader_job(), ED_seq_proxy_job_get(), EEVEE_lightbake_job_create(), PreviewLoadJob::ensure_job(), filelist_readjob_start(), fluid_bake_invoke(), fluid_free_exec(), fsmenu_bookmark_validate_job_start(), gpencil_trace_image_exec(), lineart_gpencil_bake_common(), multiresbake_image_exec(), ocean_bake_exec(), ptcache_bake_invoke(), quadriflow_remesh_exec(), screen_render_invoke(), sequencer_preview_add_sound(), sequencer_thumbnail_init_job(), solve_camera_invoke(), start_audio_video_job(), track_markers(), ui_icon_ensure_deferred(), USD_export(), and USD_import().
void WM_lib_reload | ( | struct Library * | lib, |
struct bContext * | C, | ||
struct ReportList * | reports | ||
) |
Definition at line 602 of file wm_files_link.c.
References BKE_blendfile_library_relocate(), BKE_blendfile_link_append_context_free(), BKE_blendfile_link_append_context_library_add(), BKE_blendfile_link_append_context_new(), BKE_main_id_tag_all(), BKE_main_lib_objects_recalc_all(), BKE_reportf(), BLI_exists(), BLO_has_bfile_extension(), BLO_LIBLINK_FORCE_INDIRECT, BLO_LIBLINK_USE_PLACEHOLDERS, BLO_library_link_params_init_with_context(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), DEG_relations_tag_update(), IMB_colormanagement_check_file_config(), lib, LIB_TAG_PRE_EXISTING, NC_WINDOW, NULL, RPT_ERROR, and WM_event_add_notifier().
Definition at line 622 of file wm.c.
References C, wm_draw_update(), wm_event_do_handlers(), wm_event_do_notifiers(), wm_event_do_refresh_wm_and_depsgraph(), and wm_window_process_events().
Referenced by main().
Definition at line 293 of file wm_event_system.cc.
References wmNotifier::action, BLI_addtail(), wmNotifier::category, wmNotifier::data, ListBase::first, G_MAIN, NOTE_ACTION, NOTE_CATEGORY, NOTE_DATA, NOTE_SUBTYPE, wmWindowManager::notifier_queue, wmNotifier::reference, wmNotifier::subtype, type, Main::wm, and wm_test_duplicate_notifier().
Referenced by action_unlink_exec(), blender::ed::asset_browser::AssetCatalogTreeView::activate_catalog_by_id(), ANIM_apply_keyingset(), armature_circle_select(), armature_select_linked_impl(), asset_clear_exec(), asset_mark_exec(), blender::ed::space_node::backimage_fit_exec(), blender::ed::space_node::backimage_zoom_exec(), bpy_app_debug_value_set(), bpy_batch_remove(), bpy_orphans_purge(), bpy_rna_region_from_string(), brush_generic_tool_set(), brush_scale_size_exec(), cachefile_layer_add_exec(), cachefile_layer_move_exec(), cachefile_layer_remove_exec(), blender::ed::asset::AssetList::clear(), collection_duplicate_exec(), collection_flag_exec(), collection_hierarchy_delete_exec(), collection_instance_exec(), collection_isolate_exec(), collection_link_exec(), collection_new_exec(), collection_objects_select_exec(), collection_view_layer_exec(), collection_visibility_exec(), blender::ed::space_node::compo_updatejob(), copy_particle_systems_to_object(), blender::ed::curves::convert_from_particle_system::curves_convert_from_particle_system_exec(), blender::ed::curves::convert_to_particle_system::curves_convert_to_particle_system_exec(), blender::ed::curves::disable_selection::curves_disable_selection_exec(), blender::ed::curves::set_selection_domain::curves_set_selection_domain_exec(), do_lasso_select_armature(), do_lasso_select_objects(), do_lasso_select_pose(), blender::ed::asset_browser::AssetCatalogDropController::drop_asset_catalog_into_catalog(), blender::ed::asset_browser::AssetCatalogDropController::drop_assets_into_catalog(), ED_asset_catalog_add(), ED_asset_catalog_move(), ED_asset_catalog_remove(), ED_asset_catalog_rename(), ED_fileselect_activate_asset_catalog(), ED_fileselect_activate_by_id(), ED_fileselect_activate_by_relpath(), ED_fileselect_clear(), ED_fileselect_deselect_all(), ED_gpencil_set_active_channel(), ED_gpencil_tag_scene_gpencil(), ED_mesh_color_add(), ED_mesh_color_remove_index(), ED_mesh_sculpt_color_add(), ED_mesh_sculpt_color_remove_index(), ED_mesh_uv_add(), ED_mesh_uv_remove_index(), ED_node_set_active(), ED_node_tag_update_id(), ED_node_tree_pop(), ED_node_tree_push(), ED_node_tree_start(), ED_object_base_active_refresh(), ED_object_constraint_copy_for_object(), ED_object_constraint_copy_for_pose(), ED_object_constraint_link(), ED_object_constraint_move_to_index(), ED_object_editmode_enter_ex(), ED_object_editmode_exit_ex(), ED_object_gpencil_modifier_copy_to_object(), ED_object_gpencil_modifier_move_to_index(), ED_object_modifier_copy_to_object(), ED_object_modifier_move_to_index(), ED_object_particle_edit_mode_enter_ex(), ED_object_particle_edit_mode_exit_ex(), ED_object_shaderfx_copy(), ED_object_shaderfx_link(), ED_object_shaderfx_move_to_index(), ED_object_texture_paint_mode_enter_ex(), ED_object_texture_paint_mode_exit_ex(), ED_pose_bone_select_tag_update(), ED_scene_view_layer_delete(), ED_space_image_set(), ED_undo_push(), ED_uvedit_pack_islands_multi(), ED_view3d_camera_lock_sync(), EDBM_selectmode_disable(), EDBM_selectmode_set_multi(), EDBM_selectmode_toggle_multi(), edbm_shortest_path_pick_ex(), EDBM_update(), edgering_select(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), eyedropper_add_material(), eyedropper_gpencil_modal(), generateStrokes(), blender::ed::geometry::geometry_attribute_add_exec(), blender::ed::geometry::geometry_attribute_convert_exec(), blender::ed::geometry::geometry_attribute_remove_exec(), blender::ed::geometry::geometry_color_attribute_add_exec(), blender::ed::geometry::geometry_color_attribute_duplicate_exec(), blender::ed::geometry::geometry_color_attribute_remove_exec(), blender::ed::geometry::geometry_color_attribute_set_render_exec(), ghost_event_proc(), gizmo_area_light_prop_matrix_set(), gpencil_brush_reset_all_exec(), gpencil_brush_reset_exec(), gpencil_selectmode_toggle_exec(), gpencil_update_geometry(), gpencil_uv_transform_calc(), gpencil_uv_transform_exit(), icon_preview_endjob(), blender::io::usd::import_endjob(), import_endjob(), blender::io::usd::import_startjob(), lib_id_override_editable_toggle_exec(), lineart_gpencil_bake_endjob(), make_paths_absolute_exec(), make_paths_relative_exec(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), nlaedit_disable_tweakmode(), obedit_circle_select(), object_duplicates_make_real_exec(), outliner_hide_exec(), outliner_orphans_purge_exec(), outliner_select_sync_to_edit_bone(), outliner_select_sync_to_pose_bone(), outliner_unhide_all_exec(), override_remove_button_exec(), override_type_set_button_exec(), posttrans_gpd_clean(), posttrans_mask_clean(), preferences_asset_library_add_exec(), preferences_asset_library_remove_exec(), preview_endjob(), proj_paint_add_slot(), proxy_endjob(), ptcache_job_endjob(), rearrange_gpencil_channels(), render_endjob(), rna_property_update(), save_image_op(), scene_drop_invoke(), sculpt_dynamic_topology_toggle_exec(), sculpt_sample_detail_size_modal(), select_component_domain_invoke(), select_grouped_exec(), blender::ed::space_node::send_notifiers_after_tree_change(), shaderfx_copy_exec(), blender::ed::space_node::snode_bg_viewmove_modal(), solve_camera_freejob(), thumbnail_endjob(), trace_end_job(), track_markers_endjob(), tree_element_layer_collection_activate(), tree_element_master_collection_activate(), ui_rna_update_preferences_dirty(), uv_select_mode_exec(), uv_select_tag_update_for_object(), uv_shortest_path_pick_ex(), uvedit_pack_islands_multi(), uvedit_unwrap_multi(), view3d_collection_drop_copy_external_asset(), view3d_ob_drop_copy_external_asset(), viewRedrawPost(), weight_sample_invoke(), WM_file_tag_modified(), WM_operator_stack_clear(), wm_window_timer(), wm_xr_session_gpu_binding_context_create(), wm_xr_session_gpu_binding_context_destroy(), and wm_xr_session_update_screen().
void WM_main_playanim | ( | int | argc, |
const char ** | argv | ||
) |
Definition at line 1846 of file wm_playanim.c.
References NULL, and wm_main_playanim_intern().
Referenced by arg_handle_playback_mode().
void WM_main_remap_editor_id_reference | ( | const struct IDRemapper * | mappings | ) |
Clear notifiers by reference, Used so listeners don't act on freed data.
Definition at line 314 of file wm_event_system.cc.
References ListBase::first, G_MAIN, LISTBASE_FOREACH_MUTABLE, wmWindowManager::message_bus, wmWindowManager::notifier_queue, Main::wm, WM_msg_id_remove(), and wm_notifier_clear().
Referenced by WM_init().
int WM_menu_invoke | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
int WM_menu_invoke_ex | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
wmOperatorCallContext | opcontext | ||
) |
Invoke callback, uses enum property named "type".
Definition at line 1011 of file wm_operators.c.
References C, CLOG_ERROR, PointerRNA::data, wmOperatorType::exec, wmOperatorType::idname, NULL, OPERATOR_CANCELLED, OPERATOR_INTERFACE, OPERATOR_RETVAL_CHECK, wmOperatorType::prop, PROP_ENUM, wmOperator::ptr, RNA_property_identifier(), RNA_property_is_set(), RNA_property_type(), wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiItemsFullEnumO(), uiLayoutSetOperatorContext(), WM_LOG_OPERATORS, and WM_operatortype_name().
Referenced by add_driver_button_menu_invoke(), override_type_set_button_invoke(), and WM_menu_invoke().
Call an existent menu. The menu can be created in C or Python.
Definition at line 1690 of file wm_event_system.cc.
References C, blender::compositor::context, ot, ptr, RNA_string_set(), WM_operator_name_call_ptr(), WM_operator_properties_create_ptr(), WM_operator_properties_free(), and WM_operatortype_find().
Referenced by do_outliner_operation_event(), and undo_history_invoke().
Definition at line 51 of file wm_menu_type.c.
References BLI_assert, BLI_ghash_insert(), MenuType::description, MenuType::idname, menutypes_hash, and NULL.
Referenced by ED_screen_user_menu_register(), override_idtemplate_menu(), recent_files_menu_register(), undo_history_menu_register(), and view3d_buttons_register().
Definition at line 30 of file wm_menu_type.c.
References BLI_ghash_lookup(), menutypes_hash, and NULL.
Referenced by blender::ed::asset_browser::AssetCatalogTreeViewItem::build_context_menu(), menu_items_from_ui_create(), menu_types_add_from_keymap_items(), screen_user_menu_draw(), template_ID_tabs(), ui_def_but_rna__menu_type(), ui_item_menu_hold(), UI_pie_menu_invoke(), ui_popup_context_menu_for_button(), UI_popup_menu_invoke(), uiItemM(), uiItemMContents(), wm_block_create_about(), wm_block_create_splash(), and wm_call_menu_get_name().
Definition at line 72 of file wm_menu_type.c.
References BLI_ghash_free(), BLI_ghashIterator_getValue(), ExtensionRNA::data, ExtensionRNA::free, GHASH_ITER, MEM_freeN, menutypes_hash, NULL, and MenuType::rna_ext.
Referenced by WM_exit_ex().
Definition at line 58 of file wm_menu_type.c.
References BLI_assert, BLI_ghash_remove(), MenuType::idname, MEM_freeN, menutypes_hash, NULL, and UNUSED_VARS_NDEBUG.
void WM_menutype_idname_visit_for_search | ( | const struct bContext * | C, |
struct PointerRNA * | ptr, | ||
struct PropertyRNA * | prop, | ||
const char * | edit_text, | ||
StringPropertySearchVisitFunc | visit_fn, | ||
void * | visit_user_data | ||
) |
Definition at line 66 of file wm_menu_type.c.
References BLI_ghash_str_new_ex(), and menutypes_hash.
Referenced by WM_init().
void WM_menutype_iter | ( | struct GHashIterator * | ghi | ) |
Definition at line 46 of file wm_menu_type.c.
References BLI_ghashIterator_init(), and menutypes_hash.
Referenced by menu_items_from_ui_create().
Definition at line 87 of file wm_menu_type.c.
References BKE_workspace_owner_id_check(), C, CTX_wm_workspace(), NULL, MenuType::owner_id, and MenuType::poll.
Referenced by menu_items_from_ui_create(), UI_pie_menu_invoke(), UI_popup_menu_invoke(), uiItemM_ptr(), and uiItemMContents().
Definition at line 2380 of file wm_window.c.
Definition at line 2353 of file wm_window.c.
Definition at line 2374 of file wm_window.c.
Definition at line 2386 of file wm_window.c.
size_t WM_operator_bl_idname | ( | char * | dst, |
const char * | src | ||
) |
Convert: some.op
-> SOME_OT_op
or leave as-is.
dst
. int WM_operator_call | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 1158 of file wm_event_system.cc.
References C, and WM_operator_call_ex().
int WM_operator_call_ex | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
bool | store | ||
) |
For running operators with frozen context (modal handlers, menus).
store | Store properties for re-use when an operator has finished (unless PROP_SKIP_SAVE is set). |
Definition at line 1153 of file wm_event_system.cc.
References C, and wm_operator_exec().
Referenced by dialog_exec_cb(), WM_operator_call(), and wm_operator_ui_popup_ok().
int WM_operator_call_notest | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
This is intended to be used when an invoke operator wants to call exec on itself and is basically like running op->type->exec() directly, no poll checks no freeing, since we assume whoever called invoke will take care of that
Definition at line 1163 of file wm_event_system.cc.
References C, and wm_operator_exec_notest().
Referenced by op_generic_value_invoke(), and WM_operator_filesel().
int WM_operator_call_py | ( | struct bContext * | C, |
struct wmOperatorType * | ot, | ||
wmOperatorCallContext | context, | ||
struct PointerRNA * | properties, | ||
struct ReportList * | reports, | ||
bool | is_undo | ||
) |
Similar to WM_operator_name_call called with WM_OP_EXEC_DEFAULT context.
poll()
must be called by python before this runs.Definition at line 1700 of file wm_event_system.cc.
References C, blender::compositor::context, CTX_wm_manager(), wmWindowManager::op_undo_depth, OPERATOR_CANCELLED, ot, and wm_operator_call_internal().
Referenced by pyop_call().
bool WM_operator_check_ui_empty | ( | struct wmOperatorType * | ot | ) |
Definition at line 910 of file wm_event_system.cc.
References ListBase::first, LISTBASE_FOREACH, wmOperatorType::macro, ot, PROP_HIDDEN, ptr, RNA_property_flag(), RNA_STRUCT_BEGIN, RNA_STRUCT_END, wmOperatorType::ui, WM_operator_properties_create_ptr(), and WM_operatortype_find().
Referenced by last_redo_poll().
Return false, if the UI should be disabled.
int WM_operator_confirm | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
Invoke callback, confirm menu + exec.
int WM_operator_confirm_message | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const char * | message | ||
) |
Definition at line 1177 of file wm_operators.c.
References C, IFACE_, EnumSearchMenu::op, WM_OP_EXEC_REGION_WIN, and WM_operator_confirm_message_ex().
Referenced by modifier_apply_invoke(), object_transform_apply_invoke(), outliner_orphans_purge_invoke(), pack_all_invoke(), unpack_libraries_invoke(), WM_operator_confirm(), and WM_operator_confirm_or_exec().
int WM_operator_confirm_message_ex | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const char * | title, | ||
int | icon, | ||
const char * | message, | ||
wmOperatorCallContext | opcontext | ||
) |
Can't be used as an invoke directly, needs message arg (can be NULL).
Definition at line 1153 of file wm_operators.c.
References C, PointerRNA::data, IDP_CopyProperty(), IDProperty::len, NULL, EnumSearchMenu::op, OPERATOR_INTERFACE, wmOperator::ptr, wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and uiItemFullO_ptr().
Referenced by WM_operator_confirm_message().
int WM_operator_confirm_or_exec | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
ID* WM_operator_drop_load_path | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
short | idcode | ||
) |
Use for drag & drop a path or name with operators invoke() function. Returns null if no operator property is set to identify the file or ID to use.
Definition at line 1266 of file wm_operators.c.
References BKE_idtype_idcode_to_name(), BKE_image_load_exists_ex(), BKE_main_blendfile_path(), BKE_reportf(), BLI_assert_unreachable, BLI_path_rel(), C, CTX_data_main(), FILE_MAX, id, ID_IM, id_us_plus(), MAX_ID_NAME, NULL, EnumSearchMenu::op, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_string_get(), RNA_struct_property_is_set(), RPT_ERROR, TIP_, WM_operator_properties_id_lookup_from_name_or_session_uuid(), and WM_operator_properties_id_lookup_is_set().
Referenced by background_image_add_invoke(), empty_drop_named_image_invoke(), and blender::ed::space_node::node_add_file_exec().
int WM_operator_filesel | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
Invoke callback, file selector "filepath" unset + exec.
wmOperatorType.invoke, opens file-select if path property not set, otherwise executes.
bool WM_operator_filesel_ensure_ext_imtype | ( | wmOperator * | op, |
const struct ImageFormatData * | im_format | ||
) |
Definition at line 1206 of file wm_operators.c.
References BKE_image_path_ensure_ext_from_imformat(), FILE_MAX, EnumSearchMenu::op, wmOperator::ptr, RNA_property_string_get(), RNA_property_string_set(), and RNA_struct_find_property().
Referenced by image_save_as_check(), and screenshot_check().
wmOperator* WM_operator_find_modal_by_type | ( | wmWindow * | win, |
const wmOperatorType * | ot | ||
) |
Return the first modal operator of type ot or NULL.
Definition at line 4601 of file wm_event_system.cc.
References LISTBASE_FOREACH, wmWindow::modalhandlers, wmEventHandler_Op::op, ot, wmOperator::type, and WM_HANDLER_TYPE_OP.
Referenced by gizmo_modal().
int WM_operator_flag_only_pass_through_on_press | ( | int | retval, |
const struct wmEvent * | event | ||
) |
Only finish + pass through for press events (allowing press-tweak).
Definition at line 33 of file wm_operator_utils.c.
References BLI_assert, KM_PRESS, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, and wmEvent::val.
Referenced by add_vertex_invoke(), animchannels_mouseclick_invoke(), armature_click_extrude_invoke(), edbm_dupli_extrude_cursor_invoke(), gpencil_select_invoke(), blender::ed::space_node::node_select_invoke(), select_invoke(), sequencer_select_invoke(), uv_select_edge_ring_invoke(), uv_select_invoke(), uv_select_loop_invoke(), and view3d_select_invoke().
void WM_operator_free | ( | struct wmOperator * | op | ) |
Definition at line 290 of file wm.c.
References BKE_reports_clear(), BPY_DECREF_RNA_INVALIDATE(), PointerRNA::data, ListBase::first, ReportList::flag, IDP_FreeProperty(), wmOperator::macro, MEM_freeN, wmOperator::next, wmOperator::properties, wmOperator::ptr, wmOperator::py_instance, wmOperator::reports, and RPT_FREE.
Referenced by wm_block_redo_cancel_cb(), wm_close_and_free(), WM_event_remove_handlers(), wm_handler_operator_call(), wm_operator_exec(), wm_operator_finished(), WM_operator_free_all_after(), wm_operator_free_for_fileselect(), WM_operator_handlers_clear(), wm_operator_invoke(), wm_operator_register(), WM_operator_stack_clear(), and wm_operator_ui_popup_cancel().
void WM_operator_free_all_after | ( | wmWindowManager * | wm, |
struct wmOperator * | op | ||
) |
Definition at line 325 of file wm.c.
References BLI_remlink(), wmOperator::next, NULL, wmWindowManager::operators, and WM_operator_free().
Referenced by ED_undo_operator_repeat(), gizmo_tweak_start_and_finish(), and repeat_last_exec().
void WM_operator_handlers_clear | ( | wmWindowManager * | wm, |
struct wmOperatorType * | ot | ||
) |
This function is needed in the case when an addon id disabled while a modal operator it defined is running.
Definition at line 401 of file wm.c.
References ARRAY_SIZE, wmEventHandler::flag, wmEventHandler_Op::head, LISTBASE_FOREACH, NULL, wmEventHandler_Op::op, ot, wmOperator::type, wmWindowManager::windows, WM_HANDLER_DO_FREE, WM_HANDLER_TYPE_OP, and WM_operator_free().
bool WM_operator_is_repeat | ( | const struct bContext * | C, |
const struct wmOperator * | op | ||
) |
void WM_operator_last_properties_ensure | ( | struct wmOperatorType * | ot, |
struct PointerRNA * | ptr | ||
) |
Definition at line 1260 of file wm_operators.c.
References G_MAIN, ot, ptr, RNA_pointer_create(), wmOperatorType::srna, and WM_operator_last_properties_ensure_idprops().
IDProperty* WM_operator_last_properties_ensure_idprops | ( | struct wmOperatorType * | ot | ) |
Definition at line 1251 of file wm_operators.c.
References IDP_GROUP, IDP_New(), wmOperatorType::last_properties, NULL, and ot.
Referenced by WM_operator_last_properties_ensure().
bool WM_operator_last_properties_init | ( | struct wmOperator * | op | ) |
Definition at line 839 of file wm_operators.c.
References IDP_GetPropertyFromGroup(), wmOperatorType::last_properties, LISTBASE_FOREACH, wmOperator::macro, operator_last_properties_init_impl(), and wmOperator::type.
Referenced by wm_operator_invoke().
bool WM_operator_last_properties_store | ( | struct wmOperator * | op | ) |
Definition at line 854 of file wm_operators.c.
References CLOG_INFO, ListBase::first, wmOperatorType::idname, IDP_CopyProperty(), IDP_FreeProperty(), IDP_GROUP, IDP_New(), IDP_ReplaceInGroup(), wmOperatorType::last_properties, LISTBASE_FOREACH, wmOperator::macro, IDProperty::name, NULL, wmOperator::properties, STRNCPY, wmOperator::type, and WM_LOG_OPERATORS.
Referenced by wm_handler_fileselect_do(), and wm_operator_finished().
wmOperator* WM_operator_last_redo | ( | const struct bContext * | C | ) |
int WM_operator_name_call | ( | struct bContext * | C, |
const char * | opstring, | ||
wmOperatorCallContext | context, | ||
struct PointerRNA * | properties, | ||
const wmEvent * | event | ||
) |
Definition at line 1653 of file wm_event_system.cc.
References C, blender::compositor::context, ot, WM_operator_name_call_ptr(), and WM_operatortype_find().
Referenced by annotation_draw_modal(), asset_bundle_install_exec(), console_indent_or_autocomplete_exec(), console_main_region_draw(), console_paste_exec(), do_running_jobs(), ED_object_mode_compat_set(), file_smoothscroll_invoke(), gpencil_blank_frame_add_exec(), gpencil_material_to_vertex_exec(), image_save_invoke(), mouse_nla_strips(), nlaedit_select_leftright(), blender::ed::space_node::node_render_changed_exec(), blender::ed::space_node::node_toggle_button_cb(), outliner_animdata_operation_exec(), outliner_id_operation_exec(), paintcurve_draw_exec(), pyop_call(), report_replay_exec(), save_file_forwardcompat_overwrite(), save_file_forwardcompat_saveas(), text_indent_or_autocomplete_exec(), text_save_invoke(), ui_but_anim_copy_driver(), ui_but_anim_paste_driver(), view3d_navigate_invoke(), view3d_ruler_add_invoke(), view_pan_modal(), viewdolly_modal(), viewmove_modal(), viewroll_modal(), viewrotate_modal(), viewzoom_modal(), wm_block_autorun_warning_enable_scripts(), wm_block_autorun_warning_reload_with_scripts(), wm_block_file_close_save(), WM_gizmo_modal_set_from_setup(), and WM_init_splash().
int WM_operator_name_call_ptr | ( | struct bContext * | C, |
struct wmOperatorType * | ot, | ||
wmOperatorCallContext | context, | ||
struct PointerRNA * | properties, | ||
const wmEvent * | event | ||
) |
Invokes operator in context.
event | Optionally pass in an event to use when context uses one of the WM_OP_INVOKE_* values. When left unset the wmWindow.eventstate will be used, this can cause problems for operators that read the events type - for example, storing the key that was pressed so as to be able to detect it's release. In these cases it's necessary to forward the current event being handled. |
Definition at line 1644 of file wm_event_system.cc.
References BLI_assert, C, blender::compositor::context, wmOperatorType::idname, ot, wm_operator_call_internal(), and WM_operatortype_find().
Referenced by add_driver_button_menu_exec(), bone_mouse_select_menu(), constraint_reorder(), doc_view_manual_ui_context_exec(), ED_object_mode_set_ex(), file_browse_invoke(), file_directory_enter_handle(), ghost_event_proc(), gpencil_modifier_reorder(), id_remap_fn(), image_file_browse_invoke(), lib_relocate(), blender::ed::space_node::link_drag_search_exec_fn(), modifier_reorder(), object_mouse_select_menu(), operator_search_exec_fn(), outliner_item_drag_drop_invoke(), sculpt_detail_size_set_radial_control(), shaderfx_reorder(), transform_from_gizmo_invoke(), ui_but_anim_decorate_cb(), ui_handler_wait_for_input(), view3d_interactive_add_modal(), view3d_lightcache_update(), WM_gizmo_operator_invoke(), WM_menu_name_call(), WM_operator_name_call(), WM_operator_name_call_ptr_with_depends_on_cursor(), WM_operator_name_call_with_properties(), wm_test_autorun_revert_action_exec(), and WM_toolsystem_ref_set_by_id_ex().
void WM_operator_name_call_ptr_with_depends_on_cursor | ( | struct bContext * | C, |
wmOperatorType * | ot, | ||
wmOperatorCallContext | opcontext, | ||
PointerRNA * | properties, | ||
const wmEvent * | event, | ||
const char * | drawstr | ||
) |
Definition at line 1827 of file wm_event_system.cc.
References blender::compositor::area(), uiOperatorWaitForInput::area, C, uiOperatorWaitForInput::context, CTX_IFACE_, CTX_store_copy(), CTX_store_get(), CTX_wm_area(), CTX_wm_window(), wmOperatorType::cursor_pending, PointerRNA::data, ED_area_status_text(), ED_workspace_status_text(), wmOperatorType::flag, IDP_CopyProperty(), IFACE_, LISTBASE_FOREACH, wmOperatorType::macro, wmWindow::modalhandlers, wmOperatorType::name, wmOperatorCallParams::opcontext, wmOperatorCallParams::opptr, wmOperatorCallParams::optype, OPTYPE_DEPENDS_ON_CURSOR, uiOperatorWaitForInput::optype_params, ot, SNPRINTF, wmOperatorType::translation_context, ui_handler_wait_for_input(), ui_handler_wait_for_input_remove(), UI_MAX_DRAW_STR, WM_cursor_modal_set(), WM_event_add_ui_handler(), WM_HANDLER_BLOCKING, WM_OP_CONTEXT_HAS_AREA, WM_operator_name_call_ptr(), and WM_operatortype_find().
Referenced by menu_search_exec_fn(), ui_apply_but_funcs_after(), and ui_but_extra_operator_icon_apply().
int WM_operator_name_call_with_properties | ( | struct bContext * | C, |
const char * | opstring, | ||
wmOperatorCallContext | context, | ||
struct IDProperty * | properties, | ||
const wmEvent * | event | ||
) |
Definition at line 1677 of file wm_event_system.cc.
References C, blender::compositor::context, G_MAIN, wmWindowManager::id, ot, RNA_pointer_create(), wmOperatorType::srna, WM_operator_name_call_ptr(), and WM_operatortype_find().
Referenced by wm_homefile_read_after_dialog_callback(), wm_open_mainfile_after_dialog_callback(), and wm_recover_last_session_after_dialog_callback().
Definition at line 1667 of file wm_event_system.cc.
References C, ot, WM_operator_poll(), and WM_operatortype_find().
Referenced by file_panel_asset_catalog_buttons_draw().
bool WM_operator_poll | ( | struct bContext * | C, |
struct wmOperatorType * | ot | ||
) |
Definition at line 881 of file wm_event_system.cc.
References C, LISTBASE_FOREACH, wmOperatorType::macro, ot, wmOperatorType::poll, wmOperatorType::pyop_poll, and WM_operatortype_find().
Referenced by ED_undo_operator_repeat(), edbm_point_normals_modal(), last_redo_poll(), menu_items_from_all_operators(), operator_search_update_fn(), wm_operator_exec(), wm_operator_invoke(), and WM_operator_name_poll().
bool WM_operator_poll_context | ( | struct bContext * | C, |
struct wmOperatorType * | ot, | ||
short | context | ||
) |
Definition at line 903 of file wm_event_system.cc.
References C, blender::compositor::context, ot, and wm_operator_call_internal().
Referenced by dropbox_active(), pyop_call(), pyop_poll(), ui_but_context_poll_operator_ex(), wm_drop_prepare(), WM_event_match_keymap_item(), and wm_handlers_do_gizmo_handler().
void WM_operator_properties_alloc | ( | struct PointerRNA ** | ptr, |
struct IDProperty ** | properties, | ||
const char * | opstring | ||
) |
Similar to the function above except its uses ID properties used for key-maps and macros.
Definition at line 680 of file wm_operators.c.
References IDP_GROUP, IDP_New(), MEM_callocN, NULL, ptr, and WM_operator_properties_create().
Referenced by save_file_forwardcompat_overwrite(), UI_list_custom_activate_operator_set(), UI_list_custom_drag_operator_set(), uiItemMenuEnumFullO_ptr(), WM_dropbox_add(), wm_keymap_item_properties_set(), WM_operatortype_macro_define(), and wm_xr_actionmap_item_properties_set().
void WM_operator_properties_border | ( | struct wmOperatorType * | ot | ) |
Definition at line 380 of file wm_operator_props.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ANIM_OT_previewrange_set(), IMAGE_OT_render_border(), PAINT_OT_hide_show(), PAINT_OT_mask_box_gesture(), SCULPT_OT_face_set_box_gesture(), SCULPT_OT_trim_box_gesture(), VIEW3D_OT_clip_border(), VIEW3D_OT_render_border(), WM_operator_properties_gesture_box_ex(), and WM_operator_properties_gesture_box_zoom().
void WM_operator_properties_border_to_rctf | ( | struct wmOperator * | op, |
rctf * | rect | ||
) |
Definition at line 405 of file wm_operator_props.c.
References BLI_rctf_rcti_copy(), and WM_operator_properties_border_to_rcti().
Referenced by box_select_graph_exec(), ed_marker_box_select_exec(), image_view_zoom_border_exec(), blender::ed::space_node::node_box_select_exec(), outliner_box_select_exec(), render_border_exec(), sequencer_box_select_exec(), uv_box_select_exec(), view_borderzoom_exec(), and view_ghost_border_exec().
void WM_operator_properties_border_to_rcti | ( | struct wmOperator * | op, |
struct rcti * | rect | ||
) |
Definition at line 397 of file wm_operator_props.c.
References wmOperator::ptr, RNA_int_get(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by actkeys_box_select_exec(), animchannels_box_select_exec(), box_select_exec(), file_box_select_exec(), file_box_select_modal(), gpencil_box_select_exec(), graphkeys_box_select_exec(), nlaedit_box_select_exec(), previewrange_define_exec(), render_border_exec(), sculpt_gesture_init_from_box(), view3d_box_select_exec(), view3d_clipping_exec(), view3d_zoom_border_exec(), blender::ed::space_node::viewer_border_exec(), and WM_operator_properties_border_to_rctf().
void WM_operator_properties_checker_interval | ( | struct wmOperatorType * | ot, |
bool | nth_can_disable | ||
) |
nth_can_disable | Enable if we want to be able to select no interval at all. |
Definition at line 603 of file wm_operator_props.c.
References min_ii(), ot, RNA_def_int(), and wmOperatorType::srna.
Referenced by CURVE_OT_select_nth(), MESH_OT_select_nth(), and path_select_properties().
void WM_operator_properties_checker_interval_from_op | ( | struct wmOperator * | op, |
struct CheckerIntervalParams * | op_params | ||
) |
Definition at line 636 of file wm_operator_props.c.
References mod_i(), CheckerIntervalParams::nth, offset, CheckerIntervalParams::offset, wmOperator::ptr, RNA_int_get(), and CheckerIntervalParams::skip.
Referenced by edbm_select_nth_exec(), path_select_params_from_op(), and select_nth_exec().
bool WM_operator_properties_checker_interval_test | ( | const struct CheckerIntervalParams * | op_params, |
int | depth | ||
) |
Definition at line 650 of file wm_operator_props.c.
References CheckerIntervalParams::nth, CheckerIntervalParams::offset, and CheckerIntervalParams::skip.
Referenced by mouse_mesh_shortest_path_edge(), mouse_mesh_shortest_path_face(), mouse_mesh_shortest_path_vert(), mouse_mesh_uv_shortest_path_edge(), mouse_mesh_uv_shortest_path_face(), mouse_mesh_uv_shortest_path_vert(), select_nth_bezt(), select_nth_bp(), and walker_deselect_nth().
void WM_operator_properties_clear | ( | struct PointerRNA * | ptr | ) |
Definition at line 774 of file wm_operators.c.
References PointerRNA::data, IDP_ClearProperty(), and ptr.
Referenced by wm_macro_modal().
void WM_operator_properties_confirm_or_exec | ( | struct wmOperatorType * | ot | ) |
Definition at line 32 of file wm_operator_props.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ACTION_OT_delete(), FILE_OT_directory_new(), GRAPH_OT_delete(), MARKER_OT_delete(), and OBJECT_OT_delete().
void WM_operator_properties_create | ( | struct PointerRNA * | ptr, |
const char * | opstring | ||
) |
Definition at line 667 of file wm_operators.c.
References G_MAIN, NULL, ot, ptr, RNA_pointer_create(), WM_operator_properties_create_ptr(), and WM_operatortype_find().
Referenced by doc_view_manual_ui_context_exec(), file_smoothscroll_invoke(), blender::ed::space_node::node_render_changed_exec(), wm_keymap_item_copy(), WM_operator_properties_alloc(), and wm_xr_actionmap_item_copy().
void WM_operator_properties_create_ptr | ( | struct PointerRNA * | ptr, |
struct wmOperatorType * | ot | ||
) |
Definition at line 661 of file wm_operators.c.
References G_MAIN, NULL, ot, ptr, RNA_pointer_create(), and wmOperatorType::srna.
Referenced by bone_mouse_select_menu(), constraint_reorder(), file_browse_invoke(), file_directory_enter_handle(), ghost_event_proc(), gpencil_modifier_reorder(), id_remap_fn(), image_file_browse_invoke(), lib_relocate(), blender::ed::space_node::link_drag_search_exec_fn(), modifier_reorder(), move_to_collection_menu_create(), object_mouse_select_menu(), outliner_item_drag_drop_invoke(), pyop_call(), sculpt_detail_size_set_radial_control(), shaderfx_reorder(), transform_from_gizmo_invoke(), ui_but_anim_decorate_cb(), ui_but_extra_operator_icon_add_ptr(), UI_but_operator_ptr_get(), ui_pie_menu_level_invoke(), ui_tooltip_data_from_tool(), uiItemBooleanO(), uiItemEnumO_ptr(), uiItemEnumO_string(), uiItemEnumO_value(), uiItemFloatO(), uiItemIntO(), uiItemMenuEnumFullO_ptr(), uiItemsFullEnumO(), uiItemsFullEnumO_items(), uiItemStringO(), view3d_interactive_add_modal(), view3d_lightcache_update(), WM_gizmo_operator_set(), wm_keymap_item_properties_update_ot(), WM_menu_name_call(), WM_operator_check_ui_empty(), WM_operator_properties_create(), WM_operator_pystring_ex(), WM_operator_type_set(), WM_operatortype_props_advanced_end(), wm_recover_auto_save_exec(), wm_recover_last_session_exec(), wm_test_autorun_revert_action_exec(), WM_toolsystem_ref_set_by_id_ex(), and WM_xr_actionmap_item_properties_update_ot().
bool WM_operator_properties_default | ( | struct PointerRNA * | ptr, |
bool | do_update | ||
) |
Set all props to their default.
do_update | Only update un-initialized props. |
Definition at line 730 of file wm_operators.c.
References PROP_POINTER, ptr, RNA_property_is_set(), RNA_property_pointer_get(), RNA_property_pointer_type(), RNA_property_reset(), RNA_property_type(), RNA_STRUCT_BEGIN, and RNA_STRUCT_END.
Referenced by wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), and WM_operator_type_set().
void WM_operator_properties_filesel | ( | struct wmOperatorType * | ot, |
int | filter, | ||
short | type, | ||
eFileSel_Action | action, | ||
eFileSel_Flag | flag, | ||
short | display, | ||
short | sort | ||
) |
Default properties for file-select.
Definition at line 64 of file wm_operator_props.c.
References DummyRNA_NULL_items, FILE_DEFAULTDISPLAY, FILE_HORIZONTALDISPLAY, FILE_IMGDISPLAY, FILE_LOADLIB, FILE_MAX, FILE_SAVE, FILE_SPECIAL, FILE_TYPE_ALEMBIC, FILE_TYPE_ARCHIVE, FILE_TYPE_BLENDER, FILE_TYPE_BLENDER_BACKUP, FILE_TYPE_BLENDERLIB, FILE_TYPE_BTX, FILE_TYPE_COLLADA, FILE_TYPE_FOLDER, FILE_TYPE_FTFONT, FILE_TYPE_IMAGE, FILE_TYPE_MOVIE, FILE_TYPE_OBJECT_IO, FILE_TYPE_PYSCRIPT, FILE_TYPE_SOUND, FILE_TYPE_TEXT, FILE_TYPE_USD, FILE_TYPE_VOLUME, FILE_VERTICALDISPLAY, filter(), NULL, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_collection_runtime(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_int(), RNA_def_property_flag(), RNA_def_string_dir_path(), RNA_def_string_file_name(), RNA_def_string_file_path(), sort(), wmOperatorType::srna, type, WM_FILESEL_DIRECTORY, WM_FILESEL_FILENAME, WM_FILESEL_FILEPATH, WM_FILESEL_FILES, WM_FILESEL_RELPATH, WM_FILESEL_SHOW_PROPS, and wm_operator_properties_filesel_sort_items_itemf().
Referenced by ASSET_OT_bundle_install(), BUTTONS_OT_directory_browse(), BUTTONS_OT_file_browse(), CACHEFILE_OT_layer_add(), CACHEFILE_OT_open(), CLIP_OT_open(), ED_OT_lib_id_load_custom_preview(), FILE_OT_find_missing_files(), FONT_OT_open(), FONT_OT_text_paste_from_file(), GRAPH_OT_sound_bake(), IMAGE_OT_file_browse(), IMAGE_OT_open(), IMAGE_OT_replace(), IMAGE_OT_save_as(), blender::ed::space_node::NODE_OT_add_file(), OBJECT_OT_multires_external_save(), OBJECT_OT_volume_import(), PREFERENCES_OT_asset_library_add(), RIGIDBODY_OT_world_export(), screen_screenshot_impl(), SEQUENCER_OT_change_path(), SEQUENCER_OT_export_subtitles(), SEQUENCER_OT_image_strip_add(), SEQUENCER_OT_movie_strip_add(), SEQUENCER_OT_sound_strip_add(), SOUND_OT_mixdown(), SOUND_OT_open(), SOUND_OT_open_mono(), TEXT_OT_open(), TEXT_OT_save_as(), VIEW3D_OT_background_image_add(), WM_OT_append(), WM_OT_lib_reload(), WM_OT_lib_relocate(), WM_OT_link(), WM_OT_open_mainfile(), WM_OT_recover_auto_save(), WM_OT_save_as_mainfile(), and WM_OT_save_mainfile().
void WM_operator_properties_free | ( | struct PointerRNA * | ptr | ) |
Definition at line 783 of file wm_operators.c.
References PointerRNA::data, IDP_FreeProperty(), NULL, and ptr.
Referenced by bone_mouse_select_menu(), constraint_reorder(), doc_view_manual_ui_context_exec(), file_browse_invoke(), file_directory_enter_handle(), file_smoothscroll_invoke(), ghost_event_proc(), gpencil_modifier_reorder(), id_remap_fn(), image_file_browse_invoke(), lib_relocate(), blender::ed::space_node::link_drag_search_exec_fn(), menu_search_arg_free_fn(), modifier_reorder(), blender::ed::space_node::node_render_changed_exec(), object_mouse_select_menu(), outliner_item_drag_drop_invoke(), pyop_as_string(), pyop_call(), sculpt_detail_size_set_radial_control(), shaderfx_reorder(), transform_from_gizmo_invoke(), ui_apply_but_funcs_after(), ui_but_anim_decorate_cb(), ui_but_extra_operator_icon_free(), ui_but_free(), ui_tooltip_data_from_tool(), uilist_free_dyn_data(), view3d_interactive_add_modal(), view3d_lightcache_update(), wm_dropbox_free(), WM_gizmo_free(), WM_gizmo_operator_set(), wm_handler_operator_call(), wm_keymap_item_free(), WM_keymap_item_properties_reset(), WM_keymap_remove_item(), WM_menu_name_call(), WM_operator_pystring_ex(), WM_operator_type_set(), wm_operatortype_free_macro(), wm_test_autorun_revert_action_set(), WM_toolsystem_ref_set_by_id_ex(), and wm_xr_actionmap_item_properties_free().
void WM_operator_properties_generic_select | ( | struct wmOperatorType * | ot | ) |
Selecting and tweaking items are overlapping operations. Getting both to work without conflicts requires special care. See https://wiki.blender.org/wiki/Human_Interface_Guidelines/Selection#Select-tweaking for the desired behavior.
For default click selection (with no modifier keys held), the select operators can do the following:
This utility, together with WM_generic_select_invoke() and WM_generic_select_modal() should help getting the wanted behavior to work. Most generic logic should be handled in these, so that the select operators only have to care for the case dependent handling.
Every select operator has slightly different requirements, e.g. sequencer strip selection also needs to account for handle selection. This should be the baseline behavior though.
Definition at line 497 of file wm_operator_props.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ACTION_OT_clickselect(), FILE_OT_select(), GRAPH_OT_clickselect(), MARKER_OT_select(), NLA_OT_click_select(), and SEQUENCER_OT_select().
void WM_operator_properties_gesture_box | ( | struct wmOperatorType * | ot | ) |
Definition at line 447 of file wm_operator_props.c.
References ot, and WM_operator_properties_gesture_box_ex().
Referenced by ACTION_OT_select_box(), CLIP_OT_select_box(), FILE_OT_select_box(), GPENCIL_OT_select_box(), GRAPH_OT_select_box(), INFO_OT_select_box(), MARKER_OT_select_box(), MASK_OT_select_box(), NLA_OT_select_box(), blender::ed::space_node::NODE_OT_select_box(), blender::ed::space_node::NODE_OT_viewer_border(), OUTLINER_OT_select_box(), SEQUENCER_OT_select_box(), SEQUENCER_OT_view_ghost_border(), UV_OT_select_box(), VIEW2D_OT_smoothview(), and VIEW3D_OT_select_box().
void WM_operator_properties_gesture_box_ex | ( | struct wmOperatorType * | ot, |
bool | deselect, | ||
bool | extend | ||
) |
Use with WM_gesture_box_invoke
Definition at line 412 of file wm_operator_props.c.
References ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), wmOperatorType::srna, and WM_operator_properties_border().
Referenced by WM_operator_properties_gesture_box(), and WM_operator_properties_gesture_box_select().
void WM_operator_properties_gesture_box_select | ( | struct wmOperatorType * | ot | ) |
Definition at line 443 of file wm_operator_props.c.
References ot, and WM_operator_properties_gesture_box_ex().
Referenced by ANIM_OT_channels_select_box(), and CLIP_OT_graph_select_box().
void WM_operator_properties_gesture_box_zoom | ( | struct wmOperatorType * | ot | ) |
Definition at line 512 of file wm_operator_props.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), wmOperatorType::srna, and WM_operator_properties_border().
Referenced by IMAGE_OT_view_zoom_border(), VIEW2D_OT_zoom_border(), and VIEW3D_OT_zoom_border().
void WM_operator_properties_gesture_circle | ( | struct wmOperatorType * | ot | ) |
Use with WM_gesture_circle_invoke
Definition at line 557 of file wm_operator_props.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ACTION_OT_select_circle(), CLIP_OT_select_circle(), GPENCIL_OT_select_circle(), GRAPH_OT_select_circle(), MASK_OT_select_circle(), blender::ed::space_node::NODE_OT_select_circle(), UV_OT_select_circle(), and VIEW3D_OT_select_circle().
void WM_operator_properties_gesture_lasso | ( | struct wmOperatorType * | ot | ) |
Use with WM_gesture_lasso_invoke
Definition at line 521 of file wm_operator_props.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_collection_runtime(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ACTION_OT_select_lasso(), CLIP_OT_select_lasso(), GPENCIL_OT_select_lasso(), GPENCIL_OT_stroke_cutter(), GRAPH_OT_select_lasso(), MASK_OT_select_lasso(), blender::ed::space_node::NODE_OT_select_lasso(), PAINT_OT_mask_lasso_gesture(), SCULPT_OT_face_set_lasso_gesture(), SCULPT_OT_trim_lasso_gesture(), UV_OT_select_lasso(), and VIEW3D_OT_select_lasso().
void WM_operator_properties_gesture_straightline | ( | struct wmOperatorType * | ot, |
int | cursor | ||
) |
Use with WM_gesture_straightline_invoke
Definition at line 528 of file wm_operator_props.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by IMAGE_OT_sample_line(), MESH_OT_bisect(), PAINT_OT_mask_line_gesture(), PAINT_OT_weight_gradient(), and SCULPT_OT_project_line_gesture().
void WM_operator_properties_id_lookup | ( | wmOperatorType * | ot, |
const bool | add_name_prop | ||
) |
Adds "name" and "session_uuid" properties so the caller can tell the operator which ID to act on. See WM_operator_properties_id_lookup_from_name_or_session_uuid(). Both properties will be hidden in the UI and not be saved over consecutive operator calls.
Definition at line 271 of file wm_operator_props.c.
References INT32_MAX, INT32_MIN, MAX_ID_NAME, NULL, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_int(), RNA_def_property_flag(), RNA_def_string(), and wmOperatorType::srna.
Referenced by blender::ed::space_node::NODE_OT_add_collection(), blender::ed::space_node::NODE_OT_add_file(), blender::ed::space_node::NODE_OT_add_group(), blender::ed::space_node::NODE_OT_add_mask(), blender::ed::space_node::NODE_OT_add_object(), OBJECT_OT_add_named(), OBJECT_OT_collection_external_asset_drop(), OBJECT_OT_collection_instance_add(), OBJECT_OT_data_instance_add(), OBJECT_OT_drop_named_image(), OBJECT_OT_drop_named_material(), UI_OT_drop_material(), VIEW3D_OT_background_image_add(), and VIEW3D_OT_drop_world().
struct ID* WM_operator_properties_id_lookup_from_name_or_session_uuid | ( | struct Main * | bmain, |
PointerRNA * | ptr, | ||
enum ID_Type | type | ||
) |
Tries to find an ID in bmain. There needs to be either a "session_uuid" int or "name" string property defined and set. The former has priority. See WM_operator_properties_id_lookup() for a helper to add the properties.
Definition at line 245 of file wm_operator_props.c.
References BKE_libblock_find_name(), BKE_libblock_find_session_uuid(), MAX_ID_NAME, NULL, ptr, RNA_property_int_get(), RNA_property_is_set(), RNA_property_string_get(), RNA_struct_find_property(), and type.
Referenced by collection_add_info_get_from_op(), drop_named_material_invoke(), drop_world_exec(), blender::ed::space_node::node_add_collection_exec(), blender::ed::space_node::node_add_group_get_and_poll_group_node_tree(), blender::ed::space_node::node_add_mask_exec(), blender::ed::space_node::node_add_object_exec(), object_add_named_exec(), object_data_instance_add_exec(), object_transform_to_mouse_exec(), ui_drop_material_exec(), WM_drag_free_imported_drag_ID(), and WM_operator_drop_load_path().
bool WM_operator_properties_id_lookup_is_set | ( | PointerRNA * | ptr | ) |
Check if either the "session_uuid" or "name" property is set inside ptr. If this is the case the ID can be looked up by WM_operator_properties_id_lookup_from_name_or_session_uuid().
Definition at line 265 of file wm_operator_props.c.
References ptr, and RNA_struct_property_is_set().
Referenced by blender::ed::space_node::node_add_file_invoke(), object_instance_add_invoke(), and WM_operator_drop_load_path().
void WM_operator_properties_id_lookup_set_from_id | ( | PointerRNA * | ptr, |
const ID * | id | ||
) |
Tries to pass id to an operator via either a "session_uuid" or a "name" property defined in the properties of ptr. The former is preferred, since it works properly with linking and library overrides (which may both result in multiple IDs with the same name and type).
Also see WM_operator_properties_id_lookup() and WM_operator_properties_id_lookup_from_name_or_session_uuid()
Definition at line 229 of file wm_operator_props.c.
References BLI_assert_unreachable, id, ID::name, ptr, RNA_int_set(), RNA_string_set(), RNA_struct_find_property(), and ID::session_uuid.
Referenced by view3d_id_drop_copy(), view3d_id_drop_copy_with_type(), and view3d_id_path_drop_copy().
void WM_operator_properties_mouse_select | ( | struct wmOperatorType * | ot | ) |
See ED_select_pick_params_from_operator to initialize parameters defined here.
Definition at line 572 of file wm_operator_props.c.
References ot, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by CURVE_OT_pen(), GIZMOGROUP_OT_gizmo_select(), GPENCIL_OT_select(), MASK_OT_select(), blender::ed::space_node::NODE_OT_select(), SEQUENCER_OT_select(), UV_OT_select(), and VIEW3D_OT_select().
void WM_operator_properties_reset | ( | struct wmOperator * | op | ) |
Remove all props without PROP_SKIP_SAVE.
Definition at line 757 of file wm_operators.c.
References PointerRNA::data, PROP_SKIP_SAVE, wmOperator::ptr, RNA_PROP_BEGIN, RNA_PROP_END, RNA_property_flag(), RNA_property_identifier(), RNA_struct_idprops_unset(), RNA_struct_iterator_property(), wmOperatorType::srna, and wmOperator::type.
Referenced by wm_operator_defaults_exec().
void WM_operator_properties_sanitize | ( | struct PointerRNA * | ptr, |
bool | no_context | ||
) |
Make props context sensitive or not.
Definition at line 701 of file wm_operators.c.
References PROP_ENUM, PROP_ENUM_NO_CONTEXT, PROP_POINTER, ptr, RNA_def_property_clear_flag(), RNA_def_property_flag(), RNA_property_pointer_get(), RNA_property_pointer_type(), RNA_property_type(), RNA_STRUCT_BEGIN, RNA_STRUCT_END, and RNA_struct_is_a().
Referenced by pyop_call(), UI_but_string_info_get(), ui_pie_menu_level_invoke(), ui_tooltip_data_from_button_or_extra_icon(), uiItemsFullEnumO(), uiTemplateKeymapItemProperties(), wm_keymap_item_properties_set(), wm_keymap_item_properties_update_ot(), wm_operator_create(), WM_operatortype_macro_define(), wm_xr_actionmap_item_properties_set(), and WM_xr_actionmap_item_properties_update_ot().
void WM_operator_properties_select_action | ( | struct wmOperatorType * | ot, |
int | default_action, | ||
bool | hide_gui | ||
) |
Definition at line 311 of file wm_operator_props.c.
References NULL, ot, SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, and wm_operator_properties_select_action_ex().
Referenced by INFO_OT_select_all(), PARTICLE_OT_select_roots(), PARTICLE_OT_select_tips(), and WM_operator_properties_select_all().
void WM_operator_properties_select_action_simple | ( | struct wmOperatorType * | ot, |
int | default_action, | ||
bool | hide_gui | ||
) |
Definition at line 324 of file wm_operator_props.c.
References NULL, ot, SEL_DESELECT, SEL_SELECT, and wm_operator_properties_select_action_ex().
Referenced by WM_operator_properties_select_random().
void WM_operator_properties_select_all | ( | struct wmOperatorType * | ot | ) |
Definition at line 375 of file wm_operator_props.c.
References ot, SEL_TOGGLE, and WM_operator_properties_select_action().
Referenced by ACTION_OT_select_all(), ANIM_OT_channels_select_all(), ARMATURE_OT_select_all(), CLIP_OT_graph_select_all_markers(), CLIP_OT_select_all(), CURVE_OT_select_all(), FILE_OT_select_all(), GPENCIL_OT_select_all(), GRAPH_OT_select_all(), LATTICE_OT_select_all(), MARKER_OT_select_all(), MASK_OT_select_all(), MBALL_OT_select_all(), MESH_OT_select_all(), NLA_OT_select_all(), blender::ed::space_node::NODE_OT_select_all(), OBJECT_OT_select_all(), OUTLINER_OT_select_all(), PAINT_OT_face_select_all(), PAINT_OT_vert_select_all(), PARTICLE_OT_select_all(), POSE_OT_select_all(), blender::ed::curves::SCULPT_CURVES_OT_select_all(), SEQUENCER_OT_select_all(), and UV_OT_select_all().
void WM_operator_properties_select_operation | ( | struct wmOperatorType * | ot | ) |
Definition at line 452 of file wm_operator_props.c.
References NULL, ot, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), SEL_OP_ADD, SEL_OP_AND, SEL_OP_SET, SEL_OP_SUB, SEL_OP_XOR, and wmOperatorType::srna.
Referenced by GPENCIL_OT_select_box(), GPENCIL_OT_select_lasso(), VIEW3D_OT_select_box(), and VIEW3D_OT_select_lasso().
void WM_operator_properties_select_operation_simple | ( | struct wmOperatorType * | ot | ) |
Definition at line 466 of file wm_operator_props.c.
References NULL, ot, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), SEL_OP_ADD, SEL_OP_SET, SEL_OP_SUB, and wmOperatorType::srna.
Referenced by ACTION_OT_select_box(), ACTION_OT_select_circle(), ACTION_OT_select_lasso(), CLIP_OT_select_box(), CLIP_OT_select_circle(), CLIP_OT_select_lasso(), FILE_OT_select_box(), GPENCIL_OT_select_circle(), GRAPH_OT_select_box(), GRAPH_OT_select_circle(), GRAPH_OT_select_lasso(), INFO_OT_select_box(), MARKER_OT_select_box(), MASK_OT_select_box(), MASK_OT_select_circle(), MASK_OT_select_lasso(), NLA_OT_select_box(), blender::ed::space_node::NODE_OT_select_box(), blender::ed::space_node::NODE_OT_select_circle(), blender::ed::space_node::NODE_OT_select_lasso(), OUTLINER_OT_select_box(), SEQUENCER_OT_select_box(), UV_OT_select_box(), UV_OT_select_circle(), UV_OT_select_lasso(), and VIEW3D_OT_select_circle().
void WM_operator_properties_select_random | ( | struct wmOperatorType * | ot | ) |
Use for all select random operators. Adds properties: percent, seed, action.
Definition at line 337 of file wm_operator_props.c.
References ot, RNA_def_float_factor(), RNA_def_int(), SEL_SELECT, wmOperatorType::srna, and WM_operator_properties_select_action_simple().
Referenced by CURVE_OT_select_random(), GPENCIL_OT_select_random(), LATTICE_OT_select_random(), MBALL_OT_select_random_metaelems(), MESH_OT_select_random(), OBJECT_OT_select_random(), and PARTICLE_OT_select_random().
int WM_operator_properties_select_random_seed_increment_get | ( | wmOperator * | op | ) |
Definition at line 361 of file wm_operator_props.c.
References wmOperator::flag, OP_IS_INVOKE, wmOperator::ptr, RNA_property_int_get(), RNA_property_int_set(), RNA_property_is_set(), and RNA_struct_find_property().
Referenced by curve_select_random_exec(), edbm_select_random_exec(), gpencil_select_random_exec(), lattice_select_random_exec(), object_select_random_exec(), select_random_exec(), and select_random_metaelems_exec().
void WM_operator_properties_select_walk_direction | ( | struct wmOperatorType * | ot | ) |
Definition at line 478 of file wm_operator_props.c.
References NULL, ot, PROP_SKIP_SAVE, RNA_def_enum(), RNA_def_property_flag(), wmOperatorType::srna, UI_SELECT_WALK_DOWN, UI_SELECT_WALK_LEFT, UI_SELECT_WALK_RIGHT, and UI_SELECT_WALK_UP.
Referenced by FILE_OT_select_walk(), and OUTLINER_OT_select_walk().
void WM_operator_properties_use_cursor_init | ( | struct wmOperatorType * | ot | ) |
Disable using cursor position, use when view operators are initialized from buttons.
Definition at line 433 of file wm_operator_props.c.
References ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by CLIP_OT_view_zoom(), IMAGE_OT_view_zoom(), VIEW2D_OT_zoom(), and view3d_operator_properties_common().
int WM_operator_props_dialog_popup | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
int | width | ||
) |
Definition at line 1599 of file wm_operators.c.
References C, data, MEM_callocN, OPERATOR_RUNNING_MODAL, UI_popup_block_ex(), width, wm_block_dialog_create(), wm_operator_ui_popup_cancel(), and wm_operator_ui_popup_ok().
Referenced by blender::ed::geometry::geometry_attribute_convert_invoke(), gpencil_bake_grease_pencil_animation_invoke(), gpencil_bake_mesh_animation_invoke(), gpencil_move_to_layer_invoke(), gpencil_trace_image_invoke(), image_new_invoke(), image_scale_invoke(), move_to_collection_invoke(), object_calculate_paths_invoke(), outliner_id_remap_invoke(), pose_calculate_paths_invoke(), sequencer_enable_proxies_invoke(), text_jump_invoke(), texture_paint_add_texture_paint_slot_invoke(), tile_add_invoke(), tile_fill_invoke(), wm_debug_menu_invoke(), wm_operator_props_popup_ex(), and wm_stereo3d_set_invoke().
int WM_operator_props_popup | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
int WM_operator_props_popup_call | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
Same as WM_operator_props_popup but call the operator first, This way - the button values correspond to the result of the operator. Without this, first access to a button will make the result jump, see T32452.
int WM_operator_props_popup_confirm | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
const struct wmEvent * | event | ||
) |
Invoke callback, exec + redo popup.
Same as WM_operator_props_popup but don't use operator redo. just wraps WM_operator_props_dialog_popup.
size_t size_t WM_operator_py_idname | ( | char * | dst, |
const char * | src | ||
) |
Convert: SOME_OT_op
-> some.op
or leave as-is.
dst
. size_t size_t bool WM_operator_py_idname_ok_or_report | ( | struct ReportList * | reports, |
const char * | classname, | ||
const char * | idname | ||
) |
Sanity check to ensure WM_operator_bl_idname won't fail.
Definition at line 144 of file wm_operators.c.
References BKE_reportf(), MAX_NAME, and RPT_ERROR.
char* WM_operator_pystring | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
bool | all_args, | ||
bool | macro_args | ||
) |
Definition at line 267 of file wm_operators.c.
References C, wmOperator::ptr, wmOperator::type, and WM_operator_pystring_ex().
Referenced by wm_operator_finished(), and wm_operator_reports().
bool WM_operator_pystring_abbreviate | ( | char * | str, |
int | str_len_max | ||
) |
Definition at line 272 of file wm_operators.c.
References str.
Referenced by ui_tooltip_text_python_from_op().
char* WM_operator_pystring_ex | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
bool | all_args, | ||
bool | macro_args, | ||
struct wmOperatorType * | ot, | ||
struct PointerRNA * | opptr | ||
) |
Operator as a Python command (resulting string must be freed).
Print a string representation of the operator, with the arguments that it runs so Python can run it again.
When calling from an existing wmOperator, better to use simple version: WM_operator_pystring(C, op);
NULL
(op is only used for macro operators). Definition at line 192 of file wm_operators.c.
References BLI_dynstr_append(), BLI_dynstr_appendf(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), C, ListBase::first, wmOperatorType::idname, wmOperator::macro, wmOperatorType::macro, MEM_freeN, wmOperator::next, NULL, OP_MAX_TYPENAME, ot, wmOperator::ptr, RNA_pointer_as_string_id(), RNA_pointer_as_string_keywords(), wmOperator::type, WM_operator_properties_create_ptr(), WM_operator_properties_free(), and WM_operator_py_idname().
Referenced by copy_python_command_button_exec(), pyop_as_string(), ui_but_copy_operator(), ui_layout_introspect_button(), ui_tooltip_text_python_from_op(), and WM_operator_pystring().
int WM_operator_redo_popup | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 1616 of file wm_operators.c.
References BKE_reportf(), C, CTX_wm_reports(), wmOperatorType::flag, wmOperatorType::idname, NULL, OPERATOR_CANCELLED, OPTYPE_REGISTER, wmOperatorType::poll, RPT_ERROR, wmOperator::type, UI_popup_block_invoke(), and wm_block_create_redo().
Referenced by redo_last_invoke().
Sets the active region for this space from the context.
Definition at line 941 of file wm_event_system.cc.
References blender::compositor::area(), BLI_findindex(), C, CTX_wm_area(), CTX_wm_region(), ARegion::regiontype, and RGN_TYPE_WINDOW.
Referenced by wm_operator_finished().
int WM_operator_repeat | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Execute this operator again, put here so it can share above code
Definition at line 1168 of file wm_event_system.cc.
References C, wmOperator::flag, OP_IS_REPEAT, ret, and wm_operator_exec().
Referenced by ED_undo_operator_repeat(), repeat_history_exec(), and wm_block_redo_cb().
bool WM_operator_repeat_check | ( | const struct bContext * | C, |
struct wmOperator * | op | ||
) |
WM_operator_poll(C, op->type)
also, since this call checks if WM_operator_repeat() can run at all, not that it WILL run at any time. int WM_operator_repeat_last | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 1176 of file wm_event_system.cc.
References C, wmOperator::flag, OP_IS_REPEAT_LAST, ret, and wm_operator_exec().
Referenced by repeat_last_exec().
int WM_operator_smooth_viewtx_get | ( | const struct wmOperator * | op | ) |
void WM_operator_stack_clear | ( | struct wmWindowManager * | wm | ) |
Definition at line 390 of file wm.c.
References BLI_pophead(), NC_WM, ND_HISTORY, NULL, wmWindowManager::operators, WM_main_add_notifier(), and WM_operator_free().
Referenced by ed_undo_exec(), and ed_undo_refresh_for_op().
void WM_operator_type_modal_from_exec_for_object_edit_coords | ( | struct wmOperatorType * | ot | ) |
Allow an operator with only and execute function to run modally, re-doing the action, using vertex coordinate store/restore instead of operator undo.
Definition at line 329 of file wm_operator_utils.c.
References BLI_assert, wmOperatorType::cancel, wmOperatorType::invoke, wmOperatorType::modal, NULL, op_generic_value_cancel(), op_generic_value_invoke(), op_generic_value_modal(), ot, wmOperatorType::prop, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by MESH_OT_vertices_smooth(), and TRANSFORM_OT_vertex_random().
void WM_operator_type_set | ( | struct wmOperator * | op, |
struct wmOperatorType * | ot | ||
) |
Use with extreme care! Properties, custom-data etc - must be compatible.
op | Operator to assign the type to. |
ot | Operator type to assign. |
Definition at line 336 of file wm.c.
References BLI_assert, PointerRNA::data, IDP_SyncGroupTypes(), NULL, ot, wmOperator::properties, wmOperator::ptr, ptr, wmOperator::py_instance, wmOperatorType::srna, wmOperator::type, PointerRNA::type, WM_operator_properties_create_ptr(), WM_operator_properties_default(), and WM_operator_properties_free().
Referenced by transform_modal().
int WM_operator_ui_popup | ( | struct bContext * | C, |
struct wmOperator * | op, | ||
int | width | ||
) |
Definition at line 1530 of file wm_operators.c.
References C, data, MEM_callocN, NULL, OPERATOR_RUNNING_MODAL, UI_popup_block_ex(), width, wm_operator_ui_create(), and wm_operator_ui_popup_cancel().
void WM_operator_view3d_unit_defaults | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
Definition at line 977 of file wm_operators.c.
References BLI_assert, C, CTX_data_scene(), CTX_wm_view3d(), ED_scene_grid_scale(), ED_view3d_grid_scale(), wmOperator::flag, NULL, OP_IS_INVOKE, PROP_DISTANCE, PROP_FLOAT, wmOperator::ptr, RNA_property_array_check(), RNA_property_float_get_default(), RNA_property_float_set(), RNA_property_is_set_ex(), RNA_property_subtype(), RNA_property_type(), RNA_STRUCT_BEGIN, RNA_STRUCT_END, and scene.
Referenced by add_primitive_circle_exec(), add_primitive_cone_exec(), add_primitive_cube_exec(), add_primitive_cylinder_exec(), add_primitive_grid_exec(), add_primitive_icosphere_exec(), add_primitive_monkey_exec(), add_primitive_plane_exec(), add_primitive_uvsphere_exec(), curvesurf_prim_add(), effector_add_exec(), lightprobe_add_exec(), object_add_exec(), object_add_text_exec(), object_armature_add_exec(), object_empty_add_exec(), object_gpencil_add_exec(), object_light_add_exec(), and object_metaball_add_exec().
Callback for wmOperatorType.poll
Definition at line 1221 of file wm_operators.c.
References C, CTX_wm_window(), and NULL.
Referenced by redraw_timer_poll(), SCREEN_OT_new(), SCREEN_OT_spacedata_cleanup(), screenshot_poll(), wm_link_append_poll(), WM_OT_call_menu(), WM_OT_call_menu_pie(), WM_OT_call_panel(), WM_OT_debug_menu(), WM_OT_search_menu(), WM_OT_search_operator(), WM_OT_splash(), WM_OT_splash_about(), WM_OT_stereo3d_set(), WM_OT_window_close(), and WM_OT_window_fullscreen_toggle().
void WM_operatortype_append | ( | void(*)(struct wmOperatorType *) | opfunc | ) |
struct wmOperatorType* WM_operatortype_append_macro | ( | const char * | idname, |
const char * | name, | ||
const char * | description, | ||
int | flag | ||
) |
Definition at line 457 of file wm_operator_type.c.
References BLENDER_RNA, BLI_assert, BLI_ghash_insert(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, wmOperatorType::cancel, CLOG_ERROR, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, global_ops_hash, wmOperatorType::idname, wmOperatorType::invoke, MEM_callocN, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_MACRO, ot, wmOperatorType::poll, RNA_def_struct_identifier(), RNA_def_struct_ptr(), RNA_def_struct_translation_context(), RNA_def_struct_ui_text(), wmOperatorType::rna_ext, RNA_struct_translation_context(), ExtensionRNA::srna, wmOperatorType::srna, wmOperatorType::translation_context, UNDOCUMENTED_OPERATOR_TIP, WM_LOG_OPERATORS, wm_macro_cancel(), wm_macro_exec(), wm_macro_invoke(), wm_macro_modal(), and WM_operatortype_find().
Referenced by ED_operatormacros_action(), ED_operatormacros_armature(), ED_operatormacros_clip(), ED_operatormacros_curve(), ED_operatormacros_gpencil(), ED_operatormacros_graph(), ED_operatormacros_mask(), ED_operatormacros_mesh(), ED_operatormacros_metaball(), ED_operatormacros_nla(), ED_operatormacros_node(), ED_operatormacros_object(), ED_operatormacros_paint(), ED_operatormacros_sequencer(), and ED_operatormacros_uvedit().
void WM_operatortype_append_macro_ptr | ( | void(*)(struct wmOperatorType *, void *) | opfunc, |
void * | userdata | ||
) |
void WM_operatortype_append_ptr | ( | void(*)(struct wmOperatorType *, void *) | opfunc, |
void * | userdata | ||
) |
char* WM_operatortype_description | ( | struct bContext * | C, |
struct wmOperatorType * | ot, | ||
struct PointerRNA * | properties | ||
) |
Definition at line 576 of file wm_operator_type.c.
References BLI_strdup(), C, wmOperatorType::get_description, MEM_freeN, NULL, ot, RNA_struct_ui_description(), and wmOperatorType::srna.
Referenced by UI_but_extra_icon_string_info_get(), UI_but_string_info_get(), and WM_operatortype_description_or_name().
char* WM_operatortype_description_or_name | ( | struct bContext * | C, |
struct wmOperatorType * | ot, | ||
struct PointerRNA * | properties | ||
) |
Use when we want a label, preferring the description.
Definition at line 598 of file wm_operator_type.c.
References BLI_strdup(), C, NULL, ot, WM_operatortype_description(), and WM_operatortype_name().
Referenced by ui_tooltip_data_from_gizmo().
struct wmOperatorType* WM_operatortype_find | ( | const char * | idname, |
bool | quiet | ||
) |
Definition at line 51 of file wm_operator_type.c.
References BLI_ghash_lookup(), CLOG_INFO, global_ops_hash, NULL, OP_MAX_TYPENAME, ot, WM_LOG_OPERATORS, and WM_operator_bl_idname().
Referenced by add_driver_button_menu_exec(), bone_mouse_select_menu(), constraint_reorder(), doc_view_manual_ui_context_exec(), ED_object_mode_compat_set(), ED_object_mode_set_ex(), file_browse_invoke(), file_directory_enter_handle(), ghost_event_proc(), gizmo2d_resize_setup(), gizmo2d_rotate_setup(), gizmo2d_xform_setup(), gizmo_mesh_extrude_setup(), gizmo_mesh_spin_init_setup(), gizmo_mesh_spin_redo_setup(), gizmogroup_init_properties_from_twtype(), gpencil_modifier_reorder(), id_remap_fn(), image_file_browse_invoke(), keymap_handler_log_kmi_op_str(), lib_reload_fn(), lib_relocate_fn(), blender::ed::space_node::link_drag_search_exec_fn(), modifier_reorder(), blender::nodes::node_composite_output_file_cc::node_composit_buts_file_output_ex(), object_mouse_select_menu(), ot_lookup_from_py_string(), outliner_item_drag_drop_invoke(), outliner_lib_relocate_invoke_do(), outliner_operator_menu(), panel_activate_state(), poselib_add_menu_invoke__replacemenu(), pyop_as_string(), pyop_call(), pyop_poll(), PYOP_wrap_macro_define(), screen_user_menu_draw(), sculpt_detail_size_set_radial_control(), shaderfx_reorder(), template_operator_property_buts_draw_single(), transform_from_gizmo_invoke(), transform_modal(), ui_but_anim_decorate_cb(), UI_but_extra_operator_icon_add(), UI_but_is_tool(), ui_but_menu_add_path_operators(), UI_but_operatortype_get_from_enum_menu(), ui_but_predefined_extra_operator_icons_add(), UI_list_custom_activate_operator_set(), UI_list_custom_drag_operator_set(), ui_popup_context_menu_for_button(), ui_tooltip_data_from_tool(), uiDefButO(), uiDefIconButO(), uiDefIconTextButO(), uiItemBooleanO(), uiItemEnumO(), uiItemEnumO_string(), uiItemEnumO_value(), uiItemFloatO(), uiItemFullO(), uiItemIntO(), uiItemMenuEnumFullO(), uiItemsFullEnumO(), uiItemStringO(), uiTemplateEditModeSelection(), unpack_menu(), view3d_interactive_add_modal(), view3d_lightcache_update(), view3d_panel_vgroup(), WIDGETGROUP_light_target_setup(), WIDGETGROUP_navigate_setup(), WIDGETGROUP_ruler_setup(), WIDGETGROUP_xform_cage_setup(), WIDGETGROUP_xform_shear_setup(), WM_dropbox_add(), WM_event_match_keymap_item(), wm_handler_operator_call(), wm_handlers_do_gizmo_handler(), wm_keymap_item_find(), wm_keymap_item_find_in_keymap(), wm_keymap_item_properties_update_ot(), WM_menu_name_call(), WM_modalkeymap_assign(), WM_operator_check_ui_empty(), wm_operator_create(), WM_operator_name_call(), WM_operator_name_call_ptr(), WM_operator_name_call_ptr_with_depends_on_cursor(), WM_operator_name_call_with_properties(), WM_operator_name_poll(), WM_operator_poll(), WM_operator_properties_create(), WM_operator_repeat_check(), WM_operatortype_append_macro(), WM_operatortype_macro_define(), WM_operatortype_remove(), WM_operatortype_remove_ptr(), wm_test_autorun_revert_action_exec(), WM_toolsystem_ref_set_by_id_ex(), WM_window_cursor_keymap_status_refresh(), WM_xr_actionmap_item_properties_update_ot(), and workspace_add_menu().
void WM_operatortype_idname_visit_for_search | ( | const struct bContext * | C, |
PointerRNA * | ptr, | ||
PropertyRNA * | prop, | ||
const char * | edit_text, | ||
StringPropertySearchVisitFunc | visit_fn, | ||
void * | visit_user_data | ||
) |
void WM_operatortype_iter | ( | struct GHashIterator * | ghi | ) |
Definition at line 79 of file wm_operator_type.c.
References BLI_ghashIterator_init(), and global_ops_hash.
Referenced by menu_items_from_all_operators(), operator_search_update_fn(), pyop_dir(), and WM_operatortype_last_properties_clear_all().
Remove memory of all previously executed tools.
Definition at line 234 of file wm_operator_type.c.
References BLI_ghashIterator_done(), BLI_ghashIterator_getValue(), BLI_ghashIterator_step(), IDP_FreeProperty(), wmOperatorType::last_properties, NULL, ot, and WM_operatortype_iter().
Referenced by wm_file_read_post().
struct wmOperatorTypeMacro* WM_operatortype_macro_define | ( | struct wmOperatorType * | ot, |
const char * | idname | ||
) |
Definition at line 530 of file wm_operator_type.c.
References BLI_addtail(), BLI_strncpy(), wmOperatorType::description, wmOperatorTypeMacro::idname, wmOperatorType::idname, wmOperatorType::macro, MEM_callocN, wmOperatorType::name, OP_MAX_TYPENAME, ot, wmOperatorTypeMacro::properties, wmOperatorTypeMacro::ptr, RNA_def_pointer_runtime(), wmOperatorType::srna, WM_operator_properties_alloc(), WM_operator_properties_sanitize(), and WM_operatortype_find().
Referenced by ED_operatormacros_action(), ED_operatormacros_armature(), ED_operatormacros_clip(), ED_operatormacros_curve(), ED_operatormacros_gpencil(), ED_operatormacros_graph(), ED_operatormacros_mask(), ED_operatormacros_mesh(), ED_operatormacros_metaball(), ED_operatormacros_nla(), ED_operatormacros_node(), ED_operatormacros_object(), ED_operatormacros_paint(), ED_operatormacros_sequencer(), ED_operatormacros_uvedit(), and PYOP_wrap_macro_define().
const char* WM_operatortype_name | ( | struct wmOperatorType * | ot, |
struct PointerRNA * | properties | ||
) |
Definition at line 565 of file wm_operator_type.c.
References wmOperatorType::get_name, NULL, ot, RNA_struct_ui_name(), and wmOperatorType::srna.
Referenced by dropbox_tooltip(), file_panel_operator_header(), fileselect_ensure_updated_file_params(), hud_panel_operator_redo_draw_header(), insert_key_menu_invoke(), menu_items_from_ui_create_item_from_button(), outliner_operator_menu(), repeat_history_invoke(), screen_area_options_invoke(), template_operator_property_buts_draw_single(), UI_but_extra_icon_string_info_get(), UI_but_string_info_get(), ui_def_but_operator_ptr(), uiItemFullO_ptr_ex(), uiItemMenuEnumFullO_ptr(), uiTemplateOperatorRedoProperties(), wm_enum_search_menu(), WM_menu_invoke_ex(), WM_operatortype_description_or_name(), and WM_window_cursor_keymap_status_refresh().
void WM_operatortype_props_advanced_begin | ( | struct wmOperatorType * | ot | ) |
Tag all operator-properties of ot defined after calling this, until the next WM_operatortype_props_advanced_end call (if available), with OP_PROP_TAG_ADVANCED. Previously defined ones properties not touched.
Calling this multiple times without a call to WM_operatortype_props_advanced_end, all calls after the first one are ignored. Meaning all proprieties defined after the first call are tagged as advanced.
This doesn't do the actual tagging, WM_operatortype_props_advanced_end does which is called for all operators during registration (see wm_operatortype_append__end).
Definition at line 203 of file wm_operator_type.c.
References ot, ot_prop_basic_count, RNA_struct_count_properties(), and wmOperatorType::srna.
Referenced by MESH_OT_loopcut(), MESH_OT_mark_seam(), MESH_OT_merge(), MESH_OT_subdivide(), MESH_OT_vertices_smooth(), MESH_OT_vertices_smooth_laplacian(), TRANSFORM_OT_bbone_resize(), TRANSFORM_OT_bend(), TRANSFORM_OT_create_orientation(), TRANSFORM_OT_edge_bevelweight(), TRANSFORM_OT_edge_crease(), TRANSFORM_OT_edge_slide(), TRANSFORM_OT_push_pull(), TRANSFORM_OT_resize(), TRANSFORM_OT_rotate(), TRANSFORM_OT_seq_slide(), TRANSFORM_OT_shear(), TRANSFORM_OT_shrink_fatten(), TRANSFORM_OT_skin_resize(), TRANSFORM_OT_tilt(), TRANSFORM_OT_tosphere(), TRANSFORM_OT_trackball(), TRANSFORM_OT_transform(), TRANSFORM_OT_translate(), TRANSFORM_OT_vert_crease(), and TRANSFORM_OT_vert_slide().
void WM_operatortype_props_advanced_end | ( | struct wmOperatorType * | ot | ) |
Tags all operator-properties of ot defined since the first WM_operatortype_props_advanced_begin call, or the last WM_operatortype_props_advanced_end call, with OP_PROP_TAG_ADVANCED.
Definition at line 211 of file wm_operator_type.c.
References counter, OP_PROP_TAG_ADVANCED, ot, ot_prop_basic_count, RNA_STRUCT_BEGIN, RNA_STRUCT_END, WM_operator_properties_create_ptr(), and WM_operatortype_prop_tag.
Referenced by wm_operatortype_append__end().
bool WM_operatortype_remove | ( | const char * | idname | ) |
Definition at line 160 of file wm_operator_type.c.
References NULL, ot, WM_operatortype_find(), and WM_operatortype_remove_ptr().
void WM_operatortype_remove_ptr | ( | struct wmOperatorType * | ot | ) |
Called on initialize WM_exit().
Definition at line 139 of file wm_operator_type.c.
References BLENDER_RNA, BLI_assert, BLI_ghash_remove(), ListBase::first, global_ops_hash, wmOperatorType::idname, IDP_FreeProperty(), wmOperatorType::last_properties, wmOperatorType::macro, MEM_freeN, NULL, ot, RNA_struct_free(), wmOperatorType::srna, WM_keyconfig_update_operatortype(), WM_operatortype_find(), and wm_operatortype_free_macro().
Referenced by WM_operatortype_remove().
struct wmPaintCursor* WM_paint_cursor_activate | ( | short | space_type, |
short | region_type, | ||
bool(*)(struct bContext *C) | poll, | ||
void(*)(struct bContext *C, int, int, void *customdata) | draw, | ||
void * | customdata | ||
) |
bool WM_paint_cursor_end | ( | struct wmPaintCursor * | handle | ) |
Definition at line 2126 of file wm_operators.c.
References BLI_remlink(), G_MAIN, LISTBASE_FOREACH, MEM_freeN, and wmWindowManager::paintcursors.
Referenced by annotation_draw_toggle_eraser_cursor(), annotation_draw_toggle_stabilizer_cursor(), ED_gpencil_toggle_brush_cursor(), gpencil_draw_toggle_eraser_cursor(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), paint_stroke_free(), postTrans(), pyrna_callback_classmethod_remove(), radial_control_cancel(), toggle_paint_cursor(), toggle_particle_cursor(), v3d_cursor_snap_free(), and blender::ed::sculpt_paint::image::ops::paint::PaintOperation::~PaintOperation().
void WM_paint_cursor_remove_by_type | ( | struct wmWindowManager * | wm, |
void * | draw_fn, | ||
void(*)(void *) | free | ||
) |
Definition at line 2139 of file wm_operators.c.
References BLI_remlink(), free(), LISTBASE_FOREACH_MUTABLE, MEM_freeN, and wmWindowManager::paintcursors.
Referenced by BPY_callback_wm_free().
Definition at line 44 of file wm_panel_type.c.
References BLI_ghash_insert(), g_paneltypes_hash, and PanelType::idname.
Referenced by graph_buttons_register().
Definition at line 64 of file wm_panel_type.c.
References BLI_ghash_free(), g_paneltypes_hash, and NULL.
Referenced by WM_exit_ex().
Definition at line 28 of file wm_panel_type.c.
References BLI_ghash_lookup(), g_paneltypes_hash, and NULL.
Referenced by ui_def_but_rna__panel_type(), UI_popover_panel_invoke(), uiItemPopoverPanel(), and wm_call_panel_get_name().
void WM_paneltype_idname_visit_for_search | ( | const struct bContext * | C, |
struct PointerRNA * | ptr, | ||
struct PropertyRNA * | prop, | ||
const char * | edit_text, | ||
StringPropertySearchVisitFunc | visit_fn, | ||
void * | visit_user_data | ||
) |
Called on initialize WM_init().
Definition at line 58 of file wm_panel_type.c.
References BLI_ghash_str_new_ex(), and g_paneltypes_hash.
Referenced by WM_init().
Definition at line 50 of file wm_panel_type.c.
References BLI_assert, BLI_ghash_remove(), g_paneltypes_hash, PanelType::idname, NULL, and UNUSED_VARS_NDEBUG.
Definition at line 1833 of file wm_window.c.
References GHOST_EndProgressBar(), and wmWindow::ghostwin.
Referenced by wm_jobs_update_progress_bars().
Definition at line 1825 of file wm_window.c.
References GHOST_SetProgressBar(), and wmWindow::ghostwin.
Referenced by wm_jobs_update_progress_bars().
char* WM_prop_pystring_assign | ( | struct bContext * | C, |
struct PointerRNA * | ptr, | ||
struct PropertyRNA * | prop, | ||
int | index | ||
) |
Definition at line 636 of file wm_operators.c.
References BLI_sprintfN(), C, CTX_data_main(), MEM_freeN, NULL, ptr, ret, RNA_path_full_property_py(), RNA_property_as_string(), and wm_prop_pystring_from_context().
Referenced by ui_apply_but_autokey().
Definition at line 1380 of file wm_draw.c.
References C, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_window(), CTX_wm_window_set(), and wm_draw_update().
Referenced by sample_color_exec(), sample_color_invoke(), and screenshot_data_create().
Definition at line 509 of file wm_draw.c.
References blender::compositor::area(), ARegion::regiontype, and wm_region_use_viewport_by_type().
Referenced by region_draw_azone_tab_arrow(), wm_draw_region_test(), and wm_draw_window_offscreen().
Definition at line 1373 of file wm_gizmo_map.c.
References blender::compositor::area(), ListBase::first, ARegion::gizmo_map, wmGizmoMap::is_init, LISTBASE_FOREACH, NULL, Main::screens, and WM_gizmomap_reinit().
Referenced by preferences_reset_default_theme_exec(), and wm_userpref_update_when_changed().
void WM_report | ( | eReportType | type, |
const char * | message | ||
) |
Definition at line 848 of file wm_event_system.cc.
References BKE_report(), BKE_reports_clear(), BKE_reports_init(), RPT_STORE, type, and wm_add_reports().
Referenced by action_preview_render_prepare(), button_activate_state(), cachefile_layer_add_exec(), decimate_graph_keys(), dpaint_bake_endjob(), blender::io::alembic::export_startjob(), fmodifier_reorder(), graph_driver_delete_invalid_exec(), graph_slider_invoke(), blender::io::usd::import_endjob(), import_endjob(), lineart_gpencil_bake_common(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), quadriflow_end_job(), ui_but_paste_color(), ui_but_paste_normalized_vector(), ui_but_paste_numeric_array(), ui_but_paste_numeric_value(), ui_do_but_HOTKEYEVT(), wm_draw_region_buffer_create(), WM_reportf(), and wm_xr_error_handler().
Show the report in the info header.
Definition at line 806 of file wm_event_system.cc.
References wmTimer::customdata, G_MAIN, wmWindowManager::reports, ReportList::reporttimer, TIMERREPORT, wmWindowManager::winactive, WM_event_add_timer(), and WM_event_remove_timer().
Referenced by renamebutton_cb(), ui_but_string_set(), ui_textedit_end(), wm_add_reports(), wm_block_file_close_save(), wm_file_read_report(), wm_handler_fileselect_do(), and wm_xr_error_handler().
Hide all currently displayed banners and abort their timer.
Definition at line 821 of file wm_event_system.cc.
References BKE_reports_clear(), ListBase::first, wmWindowManager::reports, ReportList::reporttimer, Main::wm, and WM_event_remove_timer().
Referenced by fluid_bake_exec(), fluid_bake_invoke(), and fluid_free_exec().
void WM_reportf | ( | eReportType | type, |
const char * | format, | ||
... | |||
) |
Needed for cases when operators are re-registered (when operator type pointers are stored).
Definition at line 663 of file wm_init_exit.c.
References UI_interface_tag_script_reload().
void WM_set_locked_interface | ( | struct wmWindowManager * | wm, |
bool | lock | ||
) |
Lock the interface for any communication.
Definition at line 5653 of file wm_event_system.cc.
References BKE_spacedata_draw_locks(), wmWindowManager::is_interface_locked, and lock.
Referenced by dpaint_bake_endjob(), dynamicpaint_bake_exec(), blender::io::alembic::export_endjob(), blender::io::usd::export_endjob(), blender::io::alembic::export_startjob(), blender::io::usd::export_startjob(), flip_pose(), fluid_bake_endjob(), fluid_bake_invoke(), fluid_free_endjob(), fluid_free_exec(), blender::io::usd::import_endjob(), import_endjob(), blender::io::usd::import_startjob(), import_startjob(), lineart_gpencil_bake_common(), lineart_gpencil_bake_endjob(), ptcache_bake_invoke(), ptcache_job_endjob(), ptcache_job_startjob(), quadriflow_end_job(), quadriflow_remesh_exec(), render_endjob(), screen_render_invoke(), solve_camera_freejob(), solve_camera_initjob(), track_markers_freejob(), and track_markers_initjob().
Definition at line 141 of file wm_stereo.c.
References Stereo3dFormat::display_mode, ED_screen_stereo3d_required(), GHOST_GetWindowState(), GHOST_kWindowStateFullScreen, wmWindow::ghostwin, scene, wmWindow::stereo3d_format, wm_stereo3d_is_fullscreen_required(), WM_window_get_active_scene(), and WM_window_get_active_screen().
Referenced by button_activate_state(), view3d_stereo3d_active(), wm_draw_window(), and wm_stereo3d_mouse_offset_apply().
Definition at line 80 of file wm_tooltip.c.
References C, g_tooltip_time_closed, MEM_freeN, NULL, PIL_check_seconds_timer(), wmTooltipState::region, bScreen::tool_tip, UI_tooltip_free(), WM_tooltip_timer_clear(), and WM_window_get_active_screen().
Referenced by gizmo_tweak_invoke(), UI_but_tooltip_timer_remove(), ui_searchbox_event(), ui_searchbox_update_fn(), wm_event_do_handlers(), wm_gizmomap_modal_set(), wm_handlers_do_gizmo_handler(), wm_handlers_do_intern(), and WM_tooltip_init().
void WM_tooltip_immediate_init | ( | struct bContext * | C, |
struct wmWindow * | win, | ||
struct ScrArea * | area, | ||
struct ARegion * | region, | ||
wmTooltipInitFn | init | ||
) |
Definition at line 31 of file wm_tooltip.c.
References blender::compositor::area(), wmTooltipState::area_from, C, init, wmTooltipState::init, MEM_callocN, NULL, wmTooltipState::region_from, bScreen::tool_tip, WM_tooltip_init(), WM_tooltip_timer_clear(), and WM_window_get_active_screen().
Referenced by button_activate_init().
Definition at line 95 of file wm_tooltip.c.
References wmTooltipState::area_from, C, copy_v2_v2_int(), CTX_wm_area(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_region_set(), wmTooltipState::event_xy, wmWindow::eventstate, wmTooltipState::exit_on_event, wmTooltipState::init, NULL, wmTooltipState::pass, wmTooltipState::region, wmTooltipState::region_from, TIMER, wmTooltipState::timer, bScreen::tool_tip, UI_tooltip_free(), WM_event_add_timer(), WM_tooltip_clear(), WM_tooltip_timer_clear(), WM_window_get_active_screen(), and wmEvent::xy.
Referenced by wm_event_do_handlers(), WM_tooltip_immediate_init(), and WM_tooltip_refresh().
Definition at line 131 of file wm_tooltip.c.
References C, NULL, wmTooltipState::region, bScreen::tool_tip, UI_tooltip_free(), WM_tooltip_init(), WM_tooltip_timer_clear(), and WM_window_get_active_screen().
Referenced by UI_but_tooltip_refresh().
Definition at line 26 of file wm_tooltip.c.
References g_tooltip_time_closed.
Referenced by button_activate_init().
Definition at line 68 of file wm_tooltip.c.
References C, CTX_wm_manager(), NULL, wmTooltipState::timer, bScreen::tool_tip, WM_event_remove_timer(), and WM_window_get_active_screen().
Referenced by button_tooltip_timer_reset(), WM_tooltip_clear(), WM_tooltip_immediate_init(), WM_tooltip_init(), WM_tooltip_refresh(), and WM_tooltip_timer_init_ex().
void WM_tooltip_timer_init | ( | struct bContext * | C, |
struct wmWindow * | win, | ||
struct ScrArea * | area, | ||
struct ARegion * | region, | ||
wmTooltipInitFn | init | ||
) |
Definition at line 62 of file wm_tooltip.c.
References blender::compositor::area(), C, init, UI_TOOLTIP_DELAY, and WM_tooltip_timer_init_ex().
Referenced by ui_searchbox_event(), and wm_handlers_do_gizmo_handler().
void WM_tooltip_timer_init_ex | ( | struct bContext * | C, |
struct wmWindow * | win, | ||
struct ScrArea * | area, | ||
struct ARegion * | region, | ||
wmTooltipInitFn | init, | ||
double | delay | ||
) |
Definition at line 46 of file wm_tooltip.c.
References blender::compositor::area(), wmTooltipState::area_from, C, CTX_wm_manager(), init, wmTooltipState::init, MEM_callocN, NULL, wmTooltipState::region_from, TIMER, wmTooltipState::timer, bScreen::tool_tip, WM_event_add_timer(), WM_tooltip_timer_clear(), and WM_window_get_active_screen().
Referenced by button_tooltip_timer_reset(), and WM_tooltip_timer_init().
bool WM_uilisttype_add | ( | struct uiListType * | ult | ) |
Definition at line 50 of file wm_uilist_type.c.
References BLI_ghash_insert(), uiListType::idname, and uilisttypes_hash.
Referenced by ED_uilisttypes_ui(), and panelRegister().
struct uiListType* WM_uilisttype_find | ( | const char * | idname, |
bool | quiet | ||
) |
Definition at line 34 of file wm_uilist_type.c.
References BLI_ghash_lookup(), NULL, and uilisttypes_hash.
Referenced by ui_template_list_data_retrieve().
Definition at line 124 of file wm_uilist_type.c.
References BLI_ghash_free(), BLI_ghashIterator_getValue(), ExtensionRNA::data, ExtensionRNA::free, GHASH_ITER, MEM_freeN, NULL, uiListType::rna_ext, and uilisttypes_hash.
Referenced by WM_exit_ex().
Called on initialize WM_init()
Definition at line 119 of file wm_uilist_type.c.
References BLI_ghash_str_new_ex(), and uilisttypes_hash.
Referenced by WM_init().
const char* WM_uilisttype_list_id_get | ( | const struct uiListType * | ult, |
struct uiList * | list | ||
) |
Get the "non-full" list-ID, see WM_uilisttype_to_full_list_id() for details.
uiList.list_id
was set using WM_uilisttype_to_full_list_id()! void WM_uilisttype_remove_ptr | ( | struct Main * | bmain, |
struct uiListType * | ult | ||
) |
Definition at line 109 of file wm_uilist_type.c.
References BLI_assert, BLI_ghash_remove(), uiListType::idname, MEM_freeN, NULL, uilisttypes_hash, UNUSED_VARS_NDEBUG, and wm_uilisttype_unlink().
void WM_uilisttype_to_full_list_id | ( | const struct uiListType * | ult, |
const char * | list_id, | ||
char | r_full_list_id[] | ||
) |
The "full" list-ID is an internal name used for storing and identifying a list. It is built like this: "{uiListType.idname}_{list_id}", whereby "list_id" is an optional parameter passed to UILayout.template_list()
. If it is not set, the full list-ID is just "{uiListType.idname}_".
Note that whenever the Python API refers to the list-ID, it's the short, "non-full" one it passed to UILayout.template_list()
. C code can query that through WM_uilisttype_list_id_get().
int WM_userdef_event_map | ( | int | kmitype | ) |
Event map that takes preferences into account.
Definition at line 420 of file wm_event_query.c.
References USER_WHEELZOOMDIR, WHEELDOWNMOUSE, WHEELINMOUSE, WHEELOUTMOUSE, and WHEELUPMOUSE.
Referenced by wm_eventmatch(), and WM_keymap_item_compare().
int WM_userdef_event_type_from_keymap_type | ( | int | kmitype | ) |
Use so we can check if 'wmEvent.type' is released in modal operators.
An alternative would be to add a 'wmEvent.type_nokeymap'... or similar.
Definition at line 432 of file wm_event_query.c.
References USER_WHEELZOOMDIR, WHEELDOWNMOUSE, WHEELINMOUSE, WHEELOUTMOUSE, and WHEELUPMOUSE.
Referenced by edbm_bevel_invoke(), edbm_inset_invoke(), gizmo_tweak_invoke(), image_view_pan_init(), image_view_zoom_init(), initTransform(), object_transform_axis_target_invoke(), op_generic_value_invoke(), poselib_blend_init_data(), radial_control_invoke(), sample_color_invoke(), slide_plane_marker_customdata(), stencil_control_invoke(), view3d_interactive_add_begin(), view_pan_init(), and view_zoom_init().
const char* WM_window_cursor_keymap_status_get | ( | const struct wmWindow * | win, |
int | button_index, | ||
int | type_index | ||
) |
Definition at line 5820 of file wm_event_system.cc.
References bScreen::active_region, blender::compositor::area(), ARRAY_SIZE, BKE_area_find_region_type(), BLI_findindex(), C, CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_region_set(), CTX_wm_window_set(), wmWindow::cursor_keymap_status, ED_area_tag_redraw(), ED_screen_areas_iter, ELEM, wmWindow::eventstate, wmEvent::flag, ARegion::handlers, wmWindow::handlers, wmKeyMapItem::idname, KM_CLICK, KM_CLICK_DRAG, KM_PRESS, LEFTMOUSE, MEM_callocN, MEM_SAFE_FREE, MIDDLEMOUSE, ot, wmKeyMapItem::ptr, ARegion::regiontype, RGN_TYPE_FOOTER, RGN_TYPE_HEADER, RGN_TYPE_HUD, RGN_TYPE_TEMPORARY, RGN_TYPE_TOOL_HEADER, RGN_TYPE_TOOL_PROPS, RGN_TYPE_TOOLS, RGN_TYPE_WINDOW, RIGHTMOUSE, SPACE_STATUSBAR, SPACE_TOPBAR, bToolKey::space_type, CursorKeymapInfo::state, CursorKeymapInfo::state_event, STRNCPY, CursorKeymapInfo::text, wmEvent::type, UNLIKELY, wmEvent::val, wm_event_cursor_store(), WM_event_match_keymap_item_from_handlers(), wm_eventemulation(), WM_operatortype_find(), WM_operatortype_name(), WM_toolsystem_mode_from_spacetype(), WM_toolsystem_ref_find(), WM_TOOLSYSTEM_SPACE_MASK, WM_window_get_active_screen(), WM_window_get_active_view_layer(), WM_window_get_active_workspace(), and WM_window_status_area_find().
Referenced by wm_event_do_notifiers().
Definition at line 2255 of file wm_window.c.
References BKE_view_layer_default_view(), BKE_view_layer_find(), ViewLayer::name, NULL, scene, STRNCPY, wmWindow::view_layer_name, and WM_window_get_active_scene().
Referenced by ED_screen_scene_change().
Definition at line 1904 of file wm_window.c.
References copy_v2_v2_int(), g_system, GHOST_GetWindowUnderCursor(), GHOST_GetWindowUserData(), NULL, wm_cursor_position_from_ghost_screen_coords(), and wm_cursor_position_to_ghost_screen_coords().
Referenced by datadropper_win_area_find(), ED_area_find_under_cursor(), and wm_event_cursor_other_windows().
struct WorkSpaceLayout* WM_window_get_active_layout | ( | const struct wmWindow * | win | ) |
Get the active screen of the active workspace in win.
bool WM_window_modal_keymap_status_draw | ( | struct bContext * | C, |
struct wmWindow * | win, | ||
struct uiLayout * | layout | ||
) |
Definition at line 5972 of file wm_event_system.cc.
References BLI_snprintf(), C, CTX_wm_manager(), ListBase::first, EnumPropertyItem::identifier, wmKeyMap::items, KM_RELEASE, LISTBASE_FOREACH, wmKeyMap::modal_items, wmWindow::modalhandlers, wmOperatorType::modalkeymap, wmKeyMapItem::next, wmEventHandler_Op::op, wmKeyMap::poll_modal_item, wmKeyMapItem::propvalue, wmOperator::type, UI_MAX_DRAW_STR, UI_MAX_SHORTCUT_STR, uiItemL(), uiLayoutRow(), uiTemplateEventFromKeymapItem(), wmKeyMapItem::val, EnumPropertyItem::value, WM_HANDLER_TYPE_OP, WM_keymap_active(), and WM_modalkeymap_operator_items_to_string_buf().
Referenced by uiTemplateInputStatus().
struct wmWindow* WM_window_open | ( | struct bContext * | C, |
const char * | title, | ||
int | x, | ||
int | y, | ||
int | sizex, | ||
int | sizey, | ||
int | space_type, | ||
bool | toplevel, | ||
bool | dialog, | ||
bool | temp, | ||
eWindowAlignment | alignment | ||
) |
space_type | SPACE_VIEW3D, SPACE_INFO, ... (eSpace_Type) |
toplevel | Not a child owned by other windows. A peer of main window. |
dialog | whether this should be made as a dialog-style window |
temp | whether this is considered a short-lived window |
alignment | how this window is positioned relative to its parent |
Definition at line 721 of file wm_window.c.
References blender::compositor::area(), bScreen::areabase, BKE_workspace_active_set(), BKE_workspace_layout_screen_get(), BLI_listbase_is_single(), BLI_rcti_size_x(), BLI_rcti_size_y(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_area_set(), CTX_wm_manager(), CTX_wm_window(), CTX_wm_window_set(), ED_area_newspace(), ED_screen_change(), ED_screen_refresh(), ED_screen_scene_change(), ED_workspace_layout_add(), ListBase::first, GHOST_GetNativePixelSize(), GHOST_SetTitle(), wmWindow::ghostwin, LISTBASE_FOREACH, ViewLayer::name, NULL, wmWindow::posx, wmWindow::posy, scene, wmWindow::sizex, wmWindow::sizey, SPACE_EMPTY, wmWindow::stereo3d_format, STRNCPY, bScreen::temp, wmWindow::view_layer_name, WIN_ALIGN_LOCATION_CENTER, WIN_ALIGN_PARENT_CENTER, wmWindowManager::windows, WM_check(), wm_window_check_size(), wm_window_close(), WM_window_get_active_scene(), WM_window_get_active_screen(), WM_window_get_active_workspace(), wm_window_ghostwindow_ensure(), wm_window_new(), wm_window_raise(), WM_window_set_active_layout(), wm_window_set_size(), wm_window_update_size_position(), wmWindow::workspace_hook, x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by area_dupli_invoke(), drivers_editor_show_exec(), ED_screen_temp_space_open(), info_log_show_exec(), render_view_open(), userpref_show_exec(), and wm_window_new_exec().
void WM_window_pixel_sample_read | ( | const wmWindowManager * | wm, |
const wmWindow * | win, | ||
const int | pos[2], | ||
float | r_col[3] | ||
) |
Definition at line 1922 of file wm_window.c.
References GHOST_ActivateWindowDrawingContext(), wmWindow::ghostwin, GPU_context_active_set(), GPU_DATA_FLOAT, GPU_frontbuffer_read_pixels(), wmWindow::gpuctx, pos, and wmWindowManager::windrawable.
Referenced by eyedropper_color_sample_fl().
uint* WM_window_pixels_read | ( | struct wmWindowManager * | wm, |
struct wmWindow * | win, | ||
int | r_size[2] | ||
) |
Definition at line 1953 of file wm_window.c.
References GHOST_ActivateWindowDrawingContext(), wmWindow::ghostwin, GPU_context_active_set(), GPU_DATA_UBYTE, GPU_frontbuffer_read_pixels(), wmWindow::gpuctx, MEM_mallocN, wmWindowManager::windrawable, WM_window_pixels_x(), and WM_window_pixels_y().
Referenced by blend_file_thumb_from_screenshot(), and screenshot_data_create().
int WM_window_pixels_x | ( | const struct wmWindow * | win | ) |
Support for native pixel size
int WM_window_pixels_y | ( | const struct wmWindow * | win | ) |
Get boundaries usable by all window contents, including global areas.
Get boundaries usable by screen-layouts, excluding global areas.
void WM_window_set_active_layout | ( | struct wmWindow * | win, |
struct WorkSpace * | workspace, | ||
struct WorkSpaceLayout * | layout | ||
) |
Definition at line 2295 of file wm_window.c.
References BKE_workspace_active_layout_set(), wmWindow::winid, and wmWindow::workspace_hook.
Referenced by wm_window_match_keep_current_wm(), and WM_window_open().
void WM_window_set_active_scene | ( | struct Main * | bmain, |
struct bContext * | C, | ||
struct wmWindow * | win, | ||
struct Scene * | scene_new | ||
) |
Definition at line 2188 of file wm_window.c.
References C, CTX_wm_manager(), ED_scene_change_update(), ED_screen_scene_change(), if(), LISTBASE_FOREACH, NC_WINDOW, NULL, wmWindow::parent, scene, wmWindow::scene, wmWindowManager::windows, WM_event_add_notifier(), and WM_window_get_active_view_layer().
Referenced by arg_handle_scene_set(), do_outliner_item_activate_tree_element(), ED_scene_add(), ED_scene_delete(), outliner_do_object_operation_ex(), outliner_object_operation_exec(), tree_element_object_activate(), tree_element_world_activate(), and workspace_scene_pinning_update().
void WM_window_set_active_screen | ( | struct wmWindow * | win, |
struct WorkSpace * | workspace, | ||
struct bScreen * | screen | ||
) |
Definition at line 2306 of file wm_window.c.
References BKE_workspace_active_screen_set(), wmWindow::winid, and wmWindow::workspace_hook.
Referenced by ED_screen_change(), and wm_window_match_keep_current_wm().
Definition at line 2237 of file wm_window.c.
References BKE_view_layer_find(), BKE_workspace_active_screen_get(), BLI_assert, ED_render_view_layer_changed(), ListBase::first, G_MAIN, LISTBASE_FOREACH, ViewLayer::name, NULL, wmWindow::parent, STRNCPY, wmWindowManager::windows, Main::wm, and WM_window_get_active_scene().
Referenced by tree_element_viewlayer_activate(), view_layer_add_exec(), and WM_window_get_active_view_layer().
void WM_window_set_active_workspace | ( | struct bContext * | C, |
struct wmWindow * | win, | ||
struct WorkSpace * | workspace | ||
) |
Definition at line 2271 of file wm_window.c.
References C, CTX_wm_manager(), ED_workspace_change(), LISTBASE_FOREACH, wmWindow::parent, bScreen::temp, wmWindowManager::windows, and WM_window_get_active_screen().
Referenced by wm_event_do_notifiers().
Definition at line 447 of file wm_window.c.
References BLF_default_dpi(), CLAMP, float(), GHOST_GetDPIHint(), GHOST_GetNativePixelSize(), wmWindow::ghostwin, max_ff(), max_ii(), VIRTUAL_PIXEL_DOUBLE, and VIRTUAL_PIXEL_NATIVE.
Referenced by ED_fileselect_window_params_get(), ED_screen_refresh(), ghost_event_proc(), wm_window_ghostwindow_add(), wm_window_ghostwindow_ensure(), and wm_window_make_drawable().
Similar to BKE_screen_area_map_find_area_xy and related functions, use here since the area is stored in the window manager.
Definition at line 5796 of file wm_event_system.cc.
References blender::compositor::area(), ScrAreaMap::areabase, wmWindow::global_areas, LISTBASE_FOREACH, SCREENFULL, SPACE_STATUSBAR, and bScreen::state.
Referenced by WM_window_cursor_keymap_status_refresh(), and WM_window_status_area_tag_redraw().
Definition at line 5811 of file wm_event_system.cc.
References blender::compositor::area(), ED_area_tag_redraw(), WM_window_get_active_screen(), and WM_window_status_area_find().
Referenced by transformEvent(), WM_event_add_modal_handler(), and wm_handler_operator_call().
Some editor data may need to be synced with scene data (3D View camera and layers). This function ensures data is synced for editors in visible work-spaces and their visible layouts.
Definition at line 2142 of file wm_window.c.
References ED_workspace_scene_data_sync(), LISTBASE_FOREACH, scene, and WM_window_get_active_scene().
Referenced by tree_element_camera_activate().
struct Scene* WM_windows_scene_get_from_screen | ( | const struct wmWindowManager * | wm, |
const struct bScreen * | screen | ||
) |
struct ViewLayer* WM_windows_view_layer_get_from_screen | ( | const struct wmWindowManager * | wm, |
const struct bScreen * | screen | ||
) |
struct WorkSpace* WM_windows_workspace_get_from_screen | ( | const wmWindowManager * | wm, |
const struct bScreen * | screen | ||
) |
Definition at line 84 of file wm_subwindow.c.
References GPU_MATRIX_ORTHO_CLIP_FAR_DEFAULT, GPU_MATRIX_ORTHO_CLIP_NEAR_DEFAULT, GPU_matrix_ortho_set(), x2, and y1.
Referenced by DRW_draw_render_loop_2d_ex(), ED_annotation_draw_2dimage(), screen_opengl_render_doit(), screen_preview_draw(), UI_view2d_view_ortho(), UI_view2d_view_orthoSpecial(), UI_view2d_view_restore(), and wmOrtho2_offset().
Definition at line 108 of file wm_subwindow.c.
References wmOrtho2_offset(), x, and y.
Referenced by draw_channel_headers(), blender::ed::space_node::node_draw_space(), wmPartialViewport(), wmViewport(), and wmWindowViewport().
Default pixel alignment for regions.
Definition at line 33 of file wm_subwindow.c.
References BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), GPU_matrix_identity_set(), GPU_scissor(), GPU_viewport(), height, width, wmOrtho2_pixelspace(), x, rcti::xmax, rcti::xmin, y, and rcti::ymin.
Referenced by ED_region_do_draw().
Definition at line 72 of file wm_subwindow.c.
References GPU_matrix_identity_set(), GPU_scissor(), GPU_viewport(), height, width, WM_window_pixels_x(), WM_window_pixels_y(), and wmOrtho2_pixelspace().
Referenced by blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), paint_cursor_cursor_draw_3d_view_brush_cursor_active(), paint_cursor_draw_3d_view_brush_cursor_inactive(), v3d_cursor_snap_draw_fn(), wm_drags_draw(), wm_draw_window(), wm_draw_window_onscreen(), and wm_region_draw_overlay().
Debugging only, convenience function to write on crash. Convenient to save a blend file from a debugger.
Definition at line 1710 of file wm_files.c.
References BKE_main_blendfile_path_from_global(), BLI_path_extension_replace(), BLI_strncpy(), BLO_write_file(), FILE_MAX, G, G_MAIN, and NULL.