|
Blender V5.0
|
#include <cstdlib>#include <cstring>#include <fmt/format.h>#include "BLI_fileops.h"#include "BLI_listbase.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BKE_appdir.hh"#include "BKE_blendfile.hh"#include "BKE_context.hh"#include "BKE_layer.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_interface_layout.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 707 of file workspace_edit.cc.
References WM_operatortype_append(), WORKSPACE_OT_add(), WORKSPACE_OT_append_activate(), WORKSPACE_OT_delete(), WORKSPACE_OT_delete_all_others(), 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 61 of file workspace_edit.cc.
References BKE_workspace_add(), and name.
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 181 of file workspace_edit.cc.
References BKE_base_is_visible(), BKE_workspace_active_layout_set(), BKE_workspace_active_screen_get(), BKE_workspace_active_set(), BKE_workspace_layout_screen_get(), BLI_assert, C, CTX_data_active_base(), CTX_data_main(), CTX_wm_workspace(), Object::mode, blender::ed::object::mode_set(), OB_MODE_OBJECT, 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 265 of file workspace_edit.cc.
References BKE_id_free(), BKE_id_free_us(), BKE_id_ordered_list(), BLI_listbase_is_single(), C, 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 240 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, WorkSpace::sequencer_scene, WorkSpaceInstanceHook::temp_layout_store, and wmWindow::workspace_hook.
Referenced by workspace_append_activate_exec(), and 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 294 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 584 of file workspace_edit.cc.
References app_template, BKE_appdir_app_templates(), BLI_freelistN(), BLI_path_to_display_name(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, C, CTX_IFACE_, FILE_MAX, IFACE_, LISTBASE_FOREACH, uiLayout::menu_fn(), uiLayout::menu_fn_argN_free(), wmOperatorType::name, uiLayout::op(), OPERATOR_INTERFACE, uiLayout::separator(), wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and workspace_add_menu().
Referenced by WORKSPACE_OT_add().
Definition at line 537 of file workspace_edit.cc.
References app_template, BKE_blendfile_workspace_config_data_free(), BLI_findstring(), LISTBASE_FOREACH, WorkspaceConfigFileData::main, name, offsetof, uiLayout::row(), uiLayout::separator(), 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 394 of file workspace_edit.cc.
References BKE_id_reorder(), BKE_libblock_find_name(), BKE_libblock_rename(), BKE_main_blendfile_path(), BLI_path_cmp, BLO_LIBLINK_APPEND_RECURSIVE, BLO_update_defaults_workspace(), BLT_I18NCONTEXT_ID_WORKSPACE, BLT_translate_new_dataname(), C, CTX_DATA_, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), CTX_wm_window(), ED_workspace_duplicate(), 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 513 of file workspace_edit.cc.
References BLI_assert, BLO_EMBEDDED_STARTUP_BLEND, BLT_I18NCONTEXT_ID_WORKSPACE, CTX_DATA_, blender::wm::ExecDefault, Main::filepath, WorkSpace::id, wmOperatorType::idname, ID::name, uiLayout::op(), RNA_string_set(), STREQ, and UI_ITEM_NONE.
Referenced by workspace_add_menu().
|
static |
Definition at line 158 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 139 of file workspace_edit.cc.
References C, 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 477 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 306 of file workspace_edit.cc.
References C, CTX_wm_workspace(), GS, ID_WS, ID::name, and UI_context_active_but_get_tab_ID().
Referenced by workspace_context_poll(), workspace_delete_all_others_exec(), 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 316 of file workspace_edit.cc.
References C, and workspace_context_get().
Referenced by WORKSPACE_OT_delete(), WORKSPACE_OT_delete_all_others(), WORKSPACE_OT_duplicate(), WORKSPACE_OT_reorder_to_back(), WORKSPACE_OT_reorder_to_front(), and WORKSPACE_OT_scene_pin_toggle().
|
static |
Definition at line 367 of file workspace_edit.cc.
References C, CTX_data_main(), LISTBASE_FOREACH, NC_SCREEN, NC_WINDOW, ND_WORKSPACE_DELETE, OPERATOR_FINISHED, WM_event_add_notifier(), workspace_context_get(), and Main::workspaces.
Referenced by WORKSPACE_OT_delete_all_others().
|
static |
Definition at line 346 of file workspace_edit.cc.
References C, 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 66 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 321 of file workspace_edit.cc.
References C, 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 619 of file workspace_edit.cc.
References ot, and workspace_add_invoke().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 454 of file workspace_edit.cc.
References FILE_MAX, MAX_ID_NAME, ot, PROP_FILEPATH, PROP_PATH_SUPPORTS_BLEND_RELATIVE, RNA_def_property_flag(), RNA_def_property_subtype(), RNA_def_string(), and workspace_append_activate_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 355 of file workspace_edit.cc.
References ot, workspace_context_poll(), and workspace_delete_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 382 of file workspace_edit.cc.
References ot, workspace_context_poll(), and workspace_delete_all_others_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 334 of file workspace_edit.cc.
References ot, workspace_context_poll(), and workspace_new_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 643 of file workspace_edit.cc.
References ot, workspace_context_poll(), and workspace_reorder_to_back_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 666 of file workspace_edit.cc.
References ot, workspace_context_poll(), and workspace_reorder_to_front_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 691 of file workspace_edit.cc.
References OPTYPE_INTERNAL, ot, workspace_context_poll(), and workspace_scene_pin_toggle_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 632 of file workspace_edit.cc.
References BKE_id_reorder(), C, 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 655 of file workspace_edit.cc.
References BKE_id_reorder(), C, 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 678 of file workspace_edit.cc.
References C, 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 95 of file workspace_edit.cc.
References BLI_assert, C, 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 493 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().