|
Blender V4.3
|
#include <cstddef>#include <cstring>#include "BLI_ghash.h"#include "BLI_sys_types.h"#include "DNA_windowmanager_types.h"#include "MEM_guardedalloc.h"#include "BLI_blenlib.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_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 281 of file wm.cc.
Referenced by wm_operator_register().
|
static |
Definition at line 137 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 239 of file wm.cc.
References BKE_screen_area_blend_read_after_liblink(), LISTBASE_FOREACH, and wmWindowManager::windows.
|
static |
Definition at line 142 of file wm.cc.
References wmWindowManager::addonconf, BKE_screen_area_map_blend_read_data(), BLI_assert, BLI_listbase_clear(), BLO_read_data_globmap_add(), BLO_read_struct, BLO_read_struct_list, wmWindowManager::defaultconf, direct_link_wm_xr_data(), wmWindowManager::drags, wmWindowManager::extensions_blocked, wmWindowManager::extensions_updates, wmWindowManager::id, id_us_ensure_real(), wmWindowManager::init_flag, wmWindowManager::jobs, wmWindowManager::keyconfigs, LISTBASE_FOREACH, wmWindowManager::message_bus, wmWindowManager::notifier_current, wmWindowManager::notifier_queue, wmWindowManager::notifier_queue_set, wmWindowManager::op_undo_depth, wmWindowManager::operators, wmWindowManager::paintcursors, wmWindow::parent, wmWindowManager::runtime, wmXrData::runtime, S3D_DISPLAY_ANAGLYPH, wmWindowManager::timers, wmWindowManager::undo_stack, wmWindowManager::userconf, wmWindowManager::winactive, wmWindowManager::windows, wmWindowManager::windrawable, WM_EXTENSIONS_UPDATE_UNSET, and wmWindowManager::xr.
|
static |
Definition at line 112 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 70 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(), 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 65 of file wm.cc.
References wm_close_and_free().
On startup, it adds all data, for matching.
Definition at line 540 of file wm.cc.
References BKE_libblock_alloc(), BKE_reports_init(), BKE_workspace_active_layout_set(), BKE_workspace_active_set(), BKE_workspace_layout_find_global(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager_set(), CTX_wm_screen(), wmWindowManager::file_saved, ID_WM, RPT_STORE, wmWindowManager::runtime, wmWindow::scene, STRNCPY, wmWindow::view_layer_name, wmWindowManager::winactive, 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 479 of file wm.cc.
References BLI_listbase_is_empty(), CTX_data_main(), CTX_wm_manager(), CTX_wm_manager_set(), ED_screens_init(), ListBase::first, G, wmWindowManager::init_flag, wmWindowManager::message_bus, 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 518 of file wm.cc.
References BLI_listbase_is_empty(), 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 565 of file wm.cc.
References wmWindowManager::autosavetimer, BKE_undosys_stack_destroy(), BKE_workspace_active_set(), BLI_assert, BLI_freelistN(), BLI_gset_free(), BLI_pophead(), BPY_callback_wm_free(), CTX_wm_manager(), CTX_wm_manager_set(), wmWindowManager::drags, wmWindowManager::keyconfigs, wmWindowManager::message_bus, wmWindowManager::notifier_current, wmWindowManager::notifier_queue, wmWindowManager::notifier_queue_set, wmWindowManager::operators, wmWindowManager::paintcursors, wmWindowManager::runtime, wmWindowManager::undo_stack, wmWindowManager::windows, wm_autosave_timer_end(), WM_drag_free_list(), WM_event_timers_free_all(), WM_keyconfig_free(), WM_msgbus_destroy(), WM_operator_free(), wm_reports_free(), wm_window_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 440 of file wm.cc.
References wmWindowManager::addonconf, CTX_py_init_get(), CTX_wm_manager(), wmWindowManager::defaultconf, ED_spacetypes_keymap(), wmKeyConfig::flag, G, wmWindowManager::init_flag, KEYCONF_INIT_DEFAULT, wmWindowManager::userconf, 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 430 of file wm.cc.
References BPY_run_string_eval(), 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 628 of file wm.cc.
References 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 283 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_close_and_free(), 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(), and wm_operator_ui_popup_cancel().
| void WM_operator_free_all_after | ( | wmWindowManager * | wm, |
| wmOperator * | op ) |
Definition at line 318 of file wm.cc.
References BLI_remlink(), wmOperator::next, 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, |
| 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 391 of file wm.cc.
References ARRAY_SIZE, wmEventHandler::flag, wmEventHandler_Op::head, 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().
| 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 357 of file wm.cc.
References BLI_addtail(), BLI_remlink(), CTX_wm_manager(), wmOperatorType::flag, MAX_OP_REGISTERED, NC_SPACE, NC_WM, ND_HISTORY, ND_SPACE_INFO_REPORT, wmWindowManager::operators, OPTYPE_REGISTER, wmOperator::prev, 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 382 of file wm.cc.
References BLI_pophead(), NC_WM, ND_HISTORY, 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_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 329 of file wm.cc.
References BLI_assert, PointerRNA::data, IDP_SyncGroupTypes(), ot, wmOperator::properties, ptr, wmOperator::ptr, wmOperator::py_instance, wmOperatorType::srna, PointerRNA::type, wmOperator::type, WM_operator_properties_create_ptr(), WM_operator_properties_default(), and WM_operator_properties_free().
Referenced by transform_modal(), and view3d_navigate_modal_fn().
|
static |
Definition at line 352 of file wm.cc.
References wmWindowManager::runtime, and WM_event_timer_remove().
Referenced by wm_close_and_free().
|
static |
Definition at line 107 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 |