|
Blender
V2.93
|
#include <stdlib.h>#include <string.h>#include "BLI_fileops.h"#include "BLI_listbase.h"#include "BLI_path_util.h"#include "BLI_utildefines.h"#include "BKE_appdir.h"#include "BKE_blendfile.h"#include "BKE_context.h"#include "BKE_lib_id.h"#include "BKE_main.h"#include "BKE_screen.h"#include "BKE_workspace.h"#include "BLO_readfile.h"#include "DNA_screen_types.h"#include "DNA_windowmanager_types.h"#include "DNA_workspace_types.h"#include "ED_datafiles.h"#include "ED_object.h"#include "ED_screen.h"#include "RNA_access.h"#include "RNA_define.h"#include "UI_interface.h"#include "UI_resources.h"#include "BLT_translation.h"#include "WM_api.h"#include "WM_types.h"#include "screen_intern.h"Go to the source code of this file.
| void ED_operatortypes_workspace | ( | void | ) |
Definition at line 542 of file workspace_edit.c.
References WM_operatortype_append(), WORKSPACE_OT_add(), WORKSPACE_OT_append_activate(), WORKSPACE_OT_delete(), WORKSPACE_OT_duplicate(), WORKSPACE_OT_reorder_to_back(), and WORKSPACE_OT_reorder_to_front().
Referenced by ED_spacetypes_init().
Definition at line 66 of file workspace_edit.c.
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 124 of file workspace_edit.c.
References BKE_workspace_active_layout_set(), BKE_workspace_active_screen_get(), BKE_workspace_active_set(), BKE_workspace_layout_screen_get(), BLI_assert, C, CTX_data_main(), CTX_wm_workspace(), ED_object_mode_set(), NULL, 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(), 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 193 of file workspace_edit.c.
References BKE_id_free(), BKE_id_ordered_list(), BLI_assert, BLI_freelistN(), BLI_listbase_is_single(), C, ED_workspace_change(), WorkSpace::id, LISTBASE_FOREACH, next, NULL, 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 167 of file workspace_edit.c.
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, 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 227 of file workspace_edit.c.
References BKE_screen_view3d_scene_sync(), BKE_workspace_active_screen_get(), and scene.
Referenced by WM_windows_scene_data_sync().
|
static |
Definition at line 450 of file workspace_edit.c.
References BKE_appdir_app_templates(), BLI_freelistN(), BLI_path_to_display_name(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, C, CTX_IFACE_, FILE_MAX, IFACE_, LISTBASE_FOREACH, wmOperatorType::name, NULL, 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 404 of file workspace_edit.c.
References app_template, BKE_blendfile_workspace_config_data_free(), BLI_findstring(), LISTBASE_FOREACH, WorkspaceConfigFileData::main, 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 300 of file workspace_edit.c.
References BKE_id_reorder(), BLO_update_defaults_workspace(), C, 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, NULL, 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 383 of file workspace_edit.c.
References BLI_assert, BLO_EMBEDDED_STARTUP_BLEND, id, WorkSpace::id, wmOperatorType::idname, Main::name, ID::name, NULL, RNA_string_set(), STREQ, uiItemFullO_ptr(), and WM_OP_EXEC_DEFAULT.
Referenced by workspace_add_menu().
|
static |
Definition at line 92 of file workspace_edit.c.
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 75 of file workspace_edit.c.
References C, CTX_data_active_object(), ED_object_mode_set(), WorkSpace::object_mode, and UNUSED_VARS.
Referenced by ED_workspace_change().
|
static |
Definition at line 350 of file workspace_edit.c.
References app_template, BKE_appdir_folder_id(), BKE_blendfile_workspace_config_read(), BLENDER_STARTUP_FILE, BLENDER_USER_CONFIG, BLI_exists(), BLI_join_dirfile(), FILE_MAX, and NULL.
Referenced by workspace_add_menu().
Definition at line 239 of file workspace_edit.c.
References C, CTX_wm_workspace(), GS, id, ID_WS, ID::name, and UI_context_active_but_get_tab_ID().
Referenced by workspace_context_poll(), workspace_delete_exec(), workspace_new_exec(), workspace_reorder_to_back_exec(), and workspace_reorder_to_front_exec().
|
static |
Definition at line 249 of file workspace_edit.c.
References C, NULL, and workspace_context_get().
Referenced by WORKSPACE_OT_delete(), WORKSPACE_OT_duplicate(), WORKSPACE_OT_reorder_to_back(), and WORKSPACE_OT_reorder_to_front().
|
static |
Definition at line 279 of file workspace_edit.c.
References C, NC_SCREEN, NC_WINDOW, ND_WORKSPACE_DELETE, NULL, OPERATOR_FINISHED, WM_event_add_notifier(), and workspace_context_get().
Referenced by WORKSPACE_OT_delete().
|
static |
Definition at line 254 of file workspace_edit.c.
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 483 of file workspace_edit.c.
References wmOperatorType::description, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, and workspace_add_invoke().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 331 of file workspace_edit.c.
References wmOperatorType::description, wmOperatorType::exec, FILE_MAX, wmOperatorType::idname, MAX_ID_NAME, wmOperatorType::name, NULL, ot, RNA_def_string(), wmOperatorType::srna, and workspace_append_activate_exec().
Referenced by ED_operatortypes_workspace().
|
static |
Definition at line 288 of file workspace_edit.c.
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 267 of file workspace_edit.c.
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 507 of file workspace_edit.c.
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 530 of file workspace_edit.c.
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 496 of file workspace_edit.c.
References BKE_id_reorder(), C, CTX_data_main(), WorkSpace::id, NC_WINDOW, NULL, OPERATOR_INTERFACE, WM_event_add_notifier(), workspace_context_get(), and Main::workspaces.
Referenced by WORKSPACE_OT_reorder_to_back().
|
static |
Definition at line 519 of file workspace_edit.c.
References BKE_id_reorder(), C, CTX_data_main(), WorkSpace::id, NC_WINDOW, NULL, OPERATOR_INTERFACE, WM_event_add_notifier(), workspace_context_get(), and Main::workspaces.
Referenced by WORKSPACE_OT_reorder_to_front().
|
static |
Definition at line 363 of file workspace_edit.c.
References app_template, BKE_appdir_app_template_id_search(), BKE_blendfile_workspace_config_read(), BLENDER_STARTUP_FILE, BLI_exists(), BLI_join_dirfile(), datatoc_startup_blend, datatoc_startup_blend_size, FILE_MAX, and NULL.
Referenced by workspace_add_menu().