|
Blender V4.3
|
#include <cstdlib>#include <cstring>#include "BLI_fileops.h"#include "BLI_listbase.h"#include "BLI_path_utils.hh"#include "BLI_utildefines.h"#include "BKE_appdir.hh"#include "BKE_blendfile.hh"#include "BKE_context.hh"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_screen.hh"#include "BKE_workspace.hh"#include "BLO_readfile.hh"#include "DNA_screen_types.h"#include "DNA_windowmanager_types.h"#include "DNA_workspace_types.h"#include "ED_datafiles.h"#include "ED_object.hh"#include "ED_screen.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "BLT_translation.hh"#include "WM_api.hh"#include "WM_types.hh"#include "screen_intern.hh"Go to the source code of this file.
| void ED_operatortypes_workspace | ( | ) |
Workspace key-maps.
Definition at line 639 of file workspace_edit.cc.
References WM_operatortype_append(), WORKSPACE_OT_add(), WORKSPACE_OT_append_activate(), WORKSPACE_OT_delete(), WORKSPACE_OT_duplicate(), WORKSPACE_OT_reorder_to_back(), WORKSPACE_OT_reorder_to_front(), and WORKSPACE_OT_scene_pin_toggle().
Referenced by ED_spacetypes_init().
Definition at line 56 of file workspace_edit.cc.
References BKE_workspace_add().
Referenced by ED_workspace_duplicate().
| bool ED_workspace_change | ( | WorkSpace * | workspace_new, |
| bContext * | C, | ||
| wmWindowManager * | wm, | ||
| wmWindow * | win ) |
Change the active workspace.
Operator call, WM + Window + screen already existed before Pretty similar to ED_screen_change since changing workspace also changes screen.
Definition at line 176 of file workspace_edit.cc.
References BKE_workspace_active_layout_set(), BKE_workspace_active_screen_get(), BKE_workspace_active_set(), BKE_workspace_layout_screen_get(), BLI_assert, CTX_data_main(), CTX_wm_workspace(), blender::ed::object::mode_set(), WorkSpace::object_mode, screen_change_prepare(), screen_change_update(), WorkSpaceInstanceHook::temp_layout_store, wmWindow::winid, WM_window_get_active_workspace(), workspace_change_get_new_layout(), workspace_change_update(), workspace_exit(), and wmWindow::workspace_hook.
Referenced by ED_workspace_delete(), and WM_window_set_active_workspace().
| bool ED_workspace_delete | ( | WorkSpace * | workspace, |
| Main * | bmain, | ||
| bContext * | C, | ||
| wmWindowManager * | wm ) |
Definition at line 241 of file workspace_edit.cc.
References BKE_id_free(), BKE_id_free_us(), BKE_id_ordered_list(), BLI_listbase_is_single(), ED_workspace_change(), blender::Vector< T, InlineBufferCapacity, Allocator >::first_index_of(), WorkSpace::id, WorkSpace::layouts, LISTBASE_FOREACH, wmWindowManager::windows, WM_window_get_active_workspace(), and Main::workspaces.
Referenced by wm_event_do_notifiers().
Duplicate a workspace including its layouts. Does not activate the workspace, but it stores the screen-layout to be activated (BKE_workspace_temp_layout_store)
Definition at line 217 of file workspace_edit.cc.
References BKE_workspace_active_layout_get(), BLI_duplicatelist(), ED_workspace_add(), ED_workspace_layout_duplicate(), WorkSpace::flags, WorkSpace::id, WorkSpace::layouts, LISTBASE_FOREACH, ID::name, WorkSpace::object_mode, WorkSpace::order, WorkSpace::owner_ids, WorkSpace::pin_scene, WorkSpaceInstanceHook::temp_layout_store, and wmWindow::workspace_hook.
Referenced by workspace_new_exec().
| void ED_workspace_scene_data_sync | ( | WorkSpaceInstanceHook * | hook, |
| Scene * | scene ) |
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 active layout of workspace.
Definition at line 270 of file workspace_edit.cc.
References BKE_screen_view3d_scene_sync(), and BKE_workspace_active_screen_get().
Referenced by WM_windows_scene_data_sync().
|
static |
Definition at line 517 of file workspace_edit.cc.
References app_template, BKE_appdir_app_templates(), BLI_freelistN(), BLI_path_to_display_name(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, CTX_IFACE_, FILE_MAX, IFACE_, LISTBASE_FOREACH, wmOperatorType::name, OPERATOR_INTERFACE, wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiItemMenuF(), uiItemMenuFN(), uiItemO(), uiItemS(), and workspace_add_menu().
Referenced by WORKSPACE_OT_add().
Definition at line 470 of file workspace_edit.cc.
References app_template, BKE_blendfile_workspace_config_data_free(), BLI_findstring(), LISTBASE_FOREACH, WorkspaceConfigFileData::main, offsetof, uiItemS(), uiLayoutRow(), WM_operatortype_find(), workspace_append_button(), workspace_config_file_read(), workspace_system_file_read(), and WorkspaceConfigFileData::workspaces.
Referenced by workspace_add_invoke().
|
static |
Definition at line 343 of file workspace_edit.cc.
References BKE_id_reorder(), BKE_libblock_rename(), BLO_LIBLINK_APPEND_RECURSIVE, BLO_update_defaults_workspace(), BLT_I18NCONTEXT_ID_WORKSPACE, BLT_translate_new_dataname(), CTX_DATA_, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), FILE_MAX, WorkSpace::id, ID_WS, MAX_ID_NAME, NC_SCREEN, ND_WORKSPACE_SET, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get(), RNA_struct_property_is_set(), WM_event_add_notifier(), WM_file_append_datablock(), and Main::workspaces.
Referenced by WORKSPACE_OT_append_activate().
|
static |
Definition at line 443 of file workspace_edit.cc.
References BLI_assert, BLO_EMBEDDED_STARTUP_BLEND, BLT_I18NCONTEXT_ID_WORKSPACE, CTX_DATA_, Main::filepath, WorkSpace::id, wmOperatorType::idname, ID::name, RNA_string_set(), STREQ, UI_ITEM_NONE, uiItemFullO_ptr(), and WM_OP_EXEC_DEFAULT.
Referenced by workspace_add_menu().
|
static |
Definition at line 153 of file workspace_edit.cc.
References BKE_workspace_active_layout_for_workspace_get(), ED_workspace_screen_change_ensure_unused_layout(), ListBase::first, WorkSpace::layouts, WorkSpaceInstanceHook::temp_layout_store, WorkSpaceInstanceHook::temp_workspace_store, WM_window_get_active_layout(), and wmWindow::workspace_hook.
Referenced by ED_workspace_change().
|
static |
Changes the object mode (if needed) to the one set in workspace_new. Object mode is still stored on object level. In future it should all be workspace level instead.
Definition at line 134 of file workspace_edit.cc.
References CTX_data_active_object(), blender::ed::object::mode_set(), WorkSpace::object_mode, UNUSED_VARS, and workspace_scene_pinning_update().
Referenced by ED_workspace_change().
|
static |
Definition at line 407 of file workspace_edit.cc.
References app_template, BKE_appdir_folder_id(), BKE_blendfile_workspace_config_read(), BLENDER_STARTUP_FILE, BLENDER_USER_CONFIG, BLI_exists(), BLI_path_join, and FILE_MAX.
Referenced by workspace_add_menu().
Definition at line 282 of file workspace_edit.cc.
References CTX_wm_workspace(), GS, ID_WS, and UI_context_active_but_get_tab_ID().
Referenced by workspace_context_poll(), workspace_delete_exec(), workspace_new_exec(), workspace_reorder_to_back_exec(), workspace_reorder_to_front_exec(), and workspace_scene_pin_toggle_exec().
|
static |
Definition at line 292 of file workspace_edit.cc.
References workspace_context_get().
Referenced by WORKSPACE_OT_delete(), WORKSPACE_OT_duplicate(), WORKSPACE_OT_reorder_to_back(), WORKSPACE_OT_reorder_to_front(), and WORKSPACE_OT_scene_pin_toggle().
|
static |
Definition at line 322 of file workspace_edit.cc.
References NC_SCREEN, NC_WINDOW, ND_WORKSPACE_DELETE, OPERATOR_FINISHED, WM_event_add_notifier(), and workspace_context_get().
Referenced by WORKSPACE_OT_delete().
Definition at line 61 of file workspace_edit.cc.
References WorkSpace::flags, WorkSpace::pin_scene, wmWindow::unpinned_scene, WM_window_get_active_scene(), and WORKSPACE_USE_PIN_SCENE.
Referenced by ED_workspace_change().
|
static |
Definition at line 297 of file workspace_edit.cc.
References CTX_data_main(), CTX_wm_window(), ED_workspace_duplicate(), NC_SCREEN, ND_WORKSPACE_SET, OPERATOR_FINISHED, WM_event_add_notifier(), and workspace_context_get().
Referenced by WORKSPACE_OT_duplicate().
|
static |
Definition at line 551 of file workspace_edit.cc.
References wmOperatorType::description, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, and workspace_add_invoke().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 388 of file workspace_edit.cc.
References wmOperatorType::description, wmOperatorType::exec, FILE_MAX, wmOperatorType::idname, MAX_ID_NAME, wmOperatorType::name, ot, RNA_def_string(), wmOperatorType::srna, and workspace_append_activate_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 331 of file workspace_edit.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, workspace_context_poll(), and workspace_delete_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 310 of file workspace_edit.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, workspace_context_poll(), and workspace_new_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 575 of file workspace_edit.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, workspace_context_poll(), and workspace_reorder_to_back_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 598 of file workspace_edit.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, workspace_context_poll(), and workspace_reorder_to_front_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 623 of file workspace_edit.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_INTERNAL, ot, wmOperatorType::poll, workspace_context_poll(), and workspace_scene_pin_toggle_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 564 of file workspace_edit.cc.
References BKE_id_reorder(), CTX_data_main(), WorkSpace::id, NC_WINDOW, OPERATOR_INTERFACE, WM_event_add_notifier(), workspace_context_get(), and Main::workspaces.
Referenced by WORKSPACE_OT_reorder_to_back().
|
static |
Definition at line 587 of file workspace_edit.cc.
References BKE_id_reorder(), CTX_data_main(), WorkSpace::id, NC_WINDOW, OPERATOR_INTERFACE, WM_event_add_notifier(), workspace_context_get(), and Main::workspaces.
Referenced by WORKSPACE_OT_reorder_to_front().
|
static |
Definition at line 610 of file workspace_edit.cc.
References WorkSpace::flags, NC_WORKSPACE, OPERATOR_FINISHED, WM_event_add_notifier(), workspace_context_get(), and WORKSPACE_USE_PIN_SCENE.
Referenced by WORKSPACE_OT_scene_pin_toggle().
|
static |
State changes (old workspace to new workspace): 1) unpinned -> pinned
Note that the pin scene must also be updated when leaving a workspace with a pinned scene. That's done separately via workspace_exit() above.
Definition at line 90 of file workspace_edit.cc.
References BLI_assert, CTX_data_main(), CTX_wm_window(), WorkSpace::flags, WorkSpace::pin_scene, wmWindow::unpinned_scene, WM_window_get_active_scene(), WM_window_set_active_scene(), and WORKSPACE_USE_PIN_SCENE.
Referenced by workspace_change_update().
|
static |
Definition at line 423 of file workspace_edit.cc.
References app_template, BKE_appdir_app_template_id_search(), BKE_blendfile_workspace_config_read(), BLENDER_STARTUP_FILE, BLI_exists(), BLI_path_join, datatoc_startup_blend, datatoc_startup_blend_size, and FILE_MAX.
Referenced by workspace_add_menu().