|
Blender V5.0
|
#include <cstring>#include "DNA_windowmanager_types.h"#include "MEM_guardedalloc.h"#include "BLI_ghash.h"#include "BLI_listbase.h"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_idprop.hh"#include "BKE_idtype.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_main.hh"#include "BKE_report.hh"#include "BKE_screen.hh"#include "BKE_workspace.hh"#include "WM_api.hh"#include "WM_keymap.hh"#include "WM_message.hh"#include "WM_types.hh"#include "wm.hh"#include "wm_draw.hh"#include "wm_event_system.hh"#include "wm_window.hh"#include "BKE_undo_system.hh"#include "ED_screen.hh"#include "BLO_read_write.hh"Go to the source code of this file.
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | MAX_OP_REGISTERED 32 |
Variables | |
| IDTypeInfo | IDType_ID_WM |
Internal functions for managing UI registerable types (operator, UI and menu types).
Also Blender's main event loop (WM_main).
Definition in file wm.cc.
| #define MAX_OP_REGISTERED 32 |
Definition at line 257 of file wm.cc.
Referenced by wm_operator_register().
|
static |
Definition at line 136 of file wm.cc.
References BKE_screen_view3d_shading_blend_read_data(), wmXrData::session_settings, and XrSessionSettings::shading.
Referenced by window_manager_blend_read_data().
|
static |
Definition at line 214 of file wm.cc.
References BKE_screen_area_blend_read_after_liblink(), LISTBASE_FOREACH, and wmWindowManager::windows.
|
static |
Definition at line 141 of file wm.cc.
References BKE_screen_area_map_blend_read_data(), BLI_assert, BLI_listbase_clear(), BLO_read_data_globmap_add(), BLO_read_struct, BLO_read_struct_list, direct_link_wm_xr_data(), EVENT_NONE, wmWindowManager::extensions_blocked, wmWindowManager::extensions_updates, wmWindowManager::id, id_us_ensure_real(), wmWindowManager::init_flag, LISTBASE_FOREACH, wmWindowManager::op_undo_depth, wmWindow::parent, wmWindowManager::runtime, wmXrData::runtime, S3D_DISPLAY_ANAGLYPH, wmWindowManager::windows, WM_EXTENSIONS_UPDATE_UNSET, and wmWindowManager::xr.
|
static |
Definition at line 111 of file wm.cc.
References BKE_id_blend_write(), BKE_screen_area_map_blend_write(), BKE_workspace_active_screen_get(), BLO_write_id_struct, BLO_write_struct, wmWindowManager::id, LISTBASE_FOREACH, wmWindowManager::runtime, wmWindowManager::windows, write_wm_xr_data(), and wmWindowManager::xr.
|
static |
Definition at line 69 of file wm.cc.
References XrSessionSettings::base_pose_object, BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_lib_query_foreachid_iter_stop(), BKE_lib_query_foreachid_process(), BKE_lib_query_foreachid_process_flags_get(), BKE_screen_foreach_id_screen_area(), BKE_workspace_active_get(), BKE_workspace_active_set(), data, flag, IDWALK_CB_NOP, IDWALK_CB_USER, IDWALK_CB_USER_ONE, IDWALK_DO_DEPRECATED_POINTERS, IDWALK_INCLUDE_UI, LISTBASE_FOREACH, wmXrData::session_settings, wmWindowManager::windows, and wmWindowManager::xr.
|
static |
Definition at line 64 of file wm.cc.
References wm_close_and_free().
On startup, it adds all data, for matching.
Definition at line 516 of file wm.cc.
References BKE_libblock_alloc(), BKE_workspace_active_layout_set(), BKE_workspace_active_set(), BKE_workspace_layout_find_global(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager_set(), CTX_wm_screen(), wmWindowManager::file_saved, ID_WM, name, wmWindowManager::runtime, wmWindow::scene, STRNCPY_UTF8, wmWindow::view_layer_name, bScreen::winid, wmWindow::winid, wm_window_make_drawable(), wm_window_new(), and wmWindow::workspace_hook.
Referenced by wm_file_read_setup_wm_finalize().
| void WM_check | ( | bContext * | C | ) |
Definition at line 455 of file wm.cc.
References BLI_listbase_is_empty(), C, CTX_data_main(), CTX_wm_manager(), CTX_wm_manager_set(), ED_screens_init(), ListBase::first, G, wmWindowManager::init_flag, wmWindowManager::runtime, wmWindowManager::windows, Main::wm, WM_file_autosave_init(), WM_INIT_FLAG_WINDOW, WM_keyconfig_init(), WM_msgbus_create(), and wm_window_ghostwindows_ensure().
Referenced by WM_file_read(), wm_homefile_read_ex(), wm_window_copy_test(), and WM_window_open().
| void wm_clear_default_size | ( | bContext * | C | ) |
Definition at line 494 of file wm.cc.
References BLI_listbase_is_empty(), C, CTX_data_main(), CTX_wm_manager(), CTX_wm_manager_set(), ListBase::first, LISTBASE_FOREACH, wmWindowManager::windows, and Main::wm.
Referenced by wm_file_read_setup_wm_finalize().
| void wm_close_and_free | ( | bContext * | C, |
| wmWindowManager * | wm ) |
Context is allowed to be NULL, do not free wm itself lib_id.cc.
Definition at line 552 of file wm.cc.
References wmWindowManager::autosavetimer, BKE_workspace_active_set(), BLI_pophead(), BPY_callback_wm_free(), C, CTX_wm_manager(), CTX_wm_manager_set(), wmWindowManager::runtime, wmWindowManager::windows, wm_autosave_timer_end(), wm_reports_free(), wm_window_free(), wm_xr_data_free(), and wm_xr_exit().
Referenced by window_manager_free_data(), and wm_file_read_setup_wm_use_new().
| void WM_keyconfig_init | ( | bContext * | C | ) |
Definition at line 416 of file wm.cc.
References C, CTX_py_init_get(), CTX_wm_manager(), ED_spacetypes_keymap(), G, wmWindowManager::init_flag, KEYCONF_INIT_DEFAULT, wmWindowManager::runtime, WM_INIT_FLAG_KEYCONFIG, WM_keyconfig_new(), WM_keyconfig_reload(), WM_KEYCONFIG_STR_DEFAULT, WM_keyconfig_update_tag(), and wm_window_keymap().
Referenced by WM_check(), and WM_init().
| void WM_keyconfig_reload | ( | bContext * | C | ) |
Definition at line 406 of file wm.cc.
References BPY_run_string_eval(), C, CTX_py_init_get(), and G.
Referenced by WM_keyconfig_init(), and wm_userpref_update_when_changed().
| void WM_main | ( | bContext * | C | ) |
Definition at line 583 of file wm.cc.
References C, wm_draw_update(), wm_event_do_handlers(), wm_event_do_notifiers(), wm_event_do_refresh_wm_and_depsgraph(), and wm_window_events_process().
Referenced by main().
| void WM_operator_free | ( | wmOperator * | op | ) |
Definition at line 259 of file wm.cc.
References BKE_reports_free(), 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, RPT_FREE, and WM_operator_free().
Referenced by wm_block_redo_cancel_cb(), WM_event_add(), WM_event_remove_handlers(), wm_handler_operator_call(), wm_operator_exec(), wm_operator_finished(), WM_operator_free(), WM_operator_free_all_after(), wm_operator_free_for_fileselect(), WM_operator_handlers_clear(), wm_operator_invoke(), wm_operator_register(), WM_operator_stack_clear(), wm_operator_ui_popup_cancel(), and blender::bke::WindowManagerRuntime::~WindowManagerRuntime().
| void WM_operator_free_all_after | ( | wmWindowManager * | wm, |
| wmOperator * | op ) |
Definition at line 294 of file wm.cc.
References BLI_remlink(), wmOperator::next, wmWindowManager::runtime, and WM_operator_free().
Referenced by ED_undo_operator_repeat(), gizmo_tweak_start_and_finish(), repeat_last_exec(), and WM_event_add().
| void WM_operator_handlers_clear | ( | wmWindowManager * | wm, |
| 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 367 of file wm.cc.
References bScreen::areabase, ARRAY_SIZE, wmEventHandler::flag, wmEventHandler_Op::head, i, LISTBASE_FOREACH, SpaceFile::op, wmEventHandler_Op::op, ot, SPACE_FILE, wmOperator::type, wmWindowManager::windows, WM_HANDLER_DO_FREE, WM_HANDLER_TYPE_OP, WM_operator_free(), and WM_window_get_active_screen().
Referenced by WM_event_add().
| void wm_operator_register | ( | bContext * | C, |
| wmOperator * | op ) |
Called on event handling by event_system.c.
All operations get registered in the window-manager here.
Definition at line 333 of file wm.cc.
References BLI_addtail(), BLI_remlink(), C, CTX_wm_manager(), wmOperatorType::flag, MAX_OP_REGISTERED, NC_SPACE, NC_WM, ND_HISTORY, ND_SPACE_INFO_REPORT, OPTYPE_REGISTER, wmOperator::prev, wmWindowManager::runtime, wmOperator::type, WM_event_add_notifier(), and WM_operator_free().
Referenced by wm_block_redo_cb(), and wm_operator_finished().
| void WM_operator_stack_clear | ( | wmWindowManager * | wm | ) |
Definition at line 358 of file wm.cc.
References BLI_pophead(), NC_WM, ND_HISTORY, wmWindowManager::runtime, WM_main_add_notifier(), and WM_operator_free().
Referenced by ed_undo_exec(), ed_undo_refresh_for_op(), ui_apply_but_funcs_after(), and WM_event_add().
| void WM_operator_type_set | ( | wmOperator * | op, |
| 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 305 of file wm.cc.
References BLI_assert, IDP_SyncGroupTypes(), ot, wmOperator::properties, ptr, wmOperator::ptr, wmOperator::py_instance, PointerRNA::type, wmOperator::type, WM_operator_properties_create_ptr(), WM_operator_properties_default(), and WM_operator_properties_free().
Referenced by blender::ed::transform::transform_modal(), view3d_navigate_modal_fn(), and WM_event_add().
|
static |
Definition at line 328 of file wm.cc.
References wmWindowManager::runtime, and WM_event_timer_remove().
Referenced by wm_close_and_free().
|
static |
Definition at line 539 of file wm.cc.
References IDP_FreeProperty(), View3DShading::prop, wmXrData::session_settings, XrSessionSettings::shading, and wmWindowManager::xr.
Referenced by wm_close_and_free().
|
static |
Definition at line 106 of file wm.cc.
References BKE_screen_view3d_shading_blend_write(), wmXrData::session_settings, and XrSessionSettings::shading.
Referenced by window_manager_blend_write().
| IDTypeInfo IDType_ID_WM |