Blender
V3.3
|
#include <stddef.h>
#include <string.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.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_idtype.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "BKE_workspace.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_types.h"
#include "wm.h"
#include "wm_draw.h"
#include "wm_event_system.h"
#include "wm_window.h"
#include "BKE_undo_system.h"
#include "ED_screen.h"
#include "BLO_read_write.h"
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.c.
|
static |
Definition at line 125 of file wm.c.
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 218 of file wm.c.
References XrSessionSettings::base_pose_object, BLO_read_id_address, ID::lib, and wmXrData::session_settings.
Referenced by window_manager_blend_read_lib().
|
static |
Definition at line 223 of file wm.c.
References BKE_workspace_active_get(), BKE_workspace_active_set(), BLO_read_id_address, id, and ID::lib.
Referenced by window_manager_blend_read_lib().
|
static |
Definition at line 130 of file wm.c.
References wmWindowManager::addonconf, BKE_reports_init(), BKE_screen_area_map_blend_read_data(), BLI_listbase_clear(), BLO_read_data_address, BLO_read_data_globmap_add(), BLO_read_list(), wmWindowManager::defaultconf, direct_link_wm_xr_data(), wmWindowManager::drags, wmWindowManager::id, id_us_ensure_real(), wmWindowManager::initialized, wmWindowManager::is_interface_locked, wmWindowManager::jobs, wmWindowManager::keyconfigs, LISTBASE_FOREACH, wmWindowManager::message_bus, wmWindowManager::notifier_queue, NULL, wmWindowManager::op_undo_depth, wmWindowManager::operators, wmWindowManager::paintcursors, wmWindowManager::reports, RPT_STORE, wmXrData::runtime, S3D_DISPLAY_ANAGLYPH, wmWindowManager::timers, wmWindowManager::undo_stack, wmWindowManager::userconf, wmWindowManager::winactive, wmWindowManager::windows, wmWindowManager::windrawable, and wmWindowManager::xr.
|
static |
Definition at line 233 of file wm.c.
References blender::compositor::area(), BKE_screen_area_blend_read_lib(), BLI_assert, BLO_read_id_address, id, wmWindowManager::id, ID_IS_LINKED, ID::lib, lib_link_wm_xr_data(), lib_link_workspace_instance_hook(), LISTBASE_FOREACH, NULL, wmWindowManager::windows, and wmWindowManager::xr.
|
static |
Definition at line 102 of file wm.c.
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, NULL, wmWindowManager::windows, write_wm_xr_data(), and wmWindowManager::xr.
|
static |
Definition at line 68 of file wm.c.
References blender::compositor::area(), 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, IDWALK_CB_NOP, IDWALK_CB_USER, IDWALK_CB_USER_ONE, IDWALK_INCLUDE_UI, LISTBASE_FOREACH, NULL, and wmWindowManager::windows.
Definition at line 63 of file wm.c.
References NULL, and wm_close_and_free().
On startup, it adds all data, for matching.
Definition at line 533 of file wm.c.
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, NULL, wmWindow::scene, STRNCPY, wmWindow::view_layer_name, wmWindowManager::winactive, bScreen::winid, wmWindow::winid, wm_window_make_drawable(), wm_window_new(), and wmWindow::workspace_hook.
Referenced by wm_window_match_do().
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().
Definition at line 511 of file wm.c.
References BLI_listbase_is_empty(), C, CTX_data_main(), CTX_wm_manager(), CTX_wm_manager_set(), ListBase::first, LISTBASE_FOREACH, NULL, wmWindowManager::windows, and Main::wm.
Referenced by wm_homefile_read_ex().
void wm_close_and_free | ( | bContext * | C, |
wmWindowManager * | wm | ||
) |
Context is allowed to be NULL, do not free wm itself (lib_id.c).
Definition at line 554 of file wm.c.
References wmWindowManager::autosavetimer, BKE_undosys_stack_destroy(), BKE_workspace_active_set(), BLI_freelistN(), BLI_pophead(), BPY_callback_wm_free(), C, CTX_wm_manager(), CTX_wm_manager_set(), wmWindowManager::drags, wmWindowManager::keyconfigs, wmWindowManager::message_bus, wmWindowManager::notifier_queue, NULL, wmWindowManager::operators, wmWindowManager::paintcursors, wmWindowManager::undo_stack, wmWindowManager::windows, wm_autosave_timer_end(), WM_drag_free_list(), WM_keyconfig_free(), WM_msgbus_destroy(), WM_operator_free(), wm_reports_free(), wm_window_free(), wm_xr_exit(), and wmWindow::workspace_hook.
Referenced by BlendfileLoadingBaseTest::blendfile_free(), window_manager_free_data(), and wm_close_and_free_all().
Definition at line 607 of file wm.c.
References BKE_libblock_free_data(), BKE_libblock_free_data_py(), BLI_remlink(), C, ListBase::first, wmWindowManager::id, MEM_freeN, and wm_close_and_free().
Referenced by wm_window_match_replace_by_file_wm().
Definition at line 433 of file wm.c.
References wmWindowManager::addonconf, C, CTX_py_init_get(), CTX_wm_manager(), wmWindowManager::defaultconf, ED_spacetypes_keymap(), wmKeyConfig::flag, G, wmWindowManager::initialized, KEYCONF_INIT_DEFAULT, NULL, wmWindowManager::userconf, WM_KEYCONFIG_IS_INIT, WM_keyconfig_new(), WM_keyconfig_reload(), WM_KEYCONFIG_STR_DEFAULT, WM_keyconfig_update(), WM_keyconfig_update_tag(), and wm_window_keymap().
Referenced by main(), and WM_check().
Definition at line 424 of file wm.c.
References BPY_run_string_eval(), C, CTX_py_init_get(), G, and NULL.
Referenced by WM_keyconfig_init(), and wm_userpref_update_when_changed().
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().
void WM_operator_free | ( | 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().
void wm_operator_register | ( | bContext * | C, |
wmOperator * | op | ||
) |
Called on event handling by event_system.c
.
All operations get registered in the windowmanager here.
Definition at line 365 of file wm.c.
References BLI_addtail(), BLI_remlink(), C, CTX_wm_manager(), wmOperatorType::flag, MAX_OP_REGISTERED, NC_SPACE, NC_WM, ND_HISTORY, ND_SPACE_INFO_REPORT, NULL, 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 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_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().
|
static |
Definition at line 359 of file wm.c.
References BKE_reports_clear(), NULL, wmWindowManager::reports, ReportList::reporttimer, and WM_event_remove_timer().
Referenced by wm_close_and_free().
|
static |
Definition at line 97 of file wm.c.
References BKE_screen_view3d_shading_blend_write(), wmXrData::session_settings, and XrSessionSettings::shading.
Referenced by window_manager_blend_write().
IDTypeInfo IDType_ID_WM |