|
Blender V5.0
|
#include <string>#include "DNA_listBase.h"#include "BLI_compiler_attrs.h"#include "BLI_vector.hh"Go to the source code of this file.
Classes | |
| struct | blender::bke::WorkSpaceStatusItem |
| struct | blender::bke::WorkSpaceRuntime |
Namespaces | |
| namespace | blender |
| namespace | blender::bke |
| #define GETTER_ATTRS ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT |
Definition at line 130 of file BKE_workspace.hh.
| #define SETTER_ATTRS ATTR_NONNULL(1) |
Definition at line 131 of file BKE_workspace.hh.
| WorkSpace * BKE_workspace_active_get | ( | WorkSpaceInstanceHook * | hook | ) |
Definition at line 563 of file workspace.cc.
References WorkSpaceInstanceHook::active.
Referenced by blender::ed::viewer_path::activate_geometry_node(), BKE_workspace_id_tag_all_visible(), CTX_wm_window_set(), ED_screen_change(), ED_screens_init(), blender::find_side_effect_nodes(), screen_change_update(), screen_new_exec(), window_manager_foreach_id(), and WM_window_get_active_workspace().
| WorkSpaceLayout * BKE_workspace_active_layout_for_workspace_get | ( | const WorkSpaceInstanceHook * | hook, |
| const WorkSpace * | workspace ) |
Get the layout to be activated should workspace become or be the active workspace in hook.
Definition at line 592 of file workspace.cc.
References WorkSpaceInstanceHook::act_layout, WorkSpaceInstanceHook::active, WorkSpace::hook_layout_relations, and workspace_relation_get_data_matching_parent().
Referenced by BLO_update_defaults_startup_blend(), and workspace_change_get_new_layout().
| WorkSpaceLayout * BKE_workspace_active_layout_get | ( | const WorkSpaceInstanceHook * | hook | ) |
Get the layout that is active for hook (which is the visible layout for the active workspace in hook).
Definition at line 587 of file workspace.cc.
References WorkSpaceInstanceHook::act_layout.
Referenced by ED_workspace_duplicate(), ED_workspace_layout_cycle(), screen_new_exec(), wm_window_close(), WM_window_get_active_layout(), and workspace_layout_delete_doit().
| void BKE_workspace_active_layout_set | ( | WorkSpaceInstanceHook * | hook, |
| int | winid, | ||
| WorkSpace * | workspace, | ||
| WorkSpaceLayout * | layout ) |
Activate a layout.
Sets layout as active for workspace when activated through or already active in hook. So when the active workspace of hook is workspace, layout becomes the active layout of hook too. See BKE_workspace_active_set().
workspace does not need to be active for this.
WorkSpaceInstanceHook.act_layout should only be modified directly to update the layout pointer.
Definition at line 605 of file workspace.cc.
References WorkSpaceInstanceHook::act_layout, WorkSpace::hook_layout_relations, winid, and workspace_relation_ensure_updated().
Referenced by BKE_workspace_active_screen_set(), BKE_workspace_instance_hook_create(), do_version_workspaces_after_lib_link(), ED_workspace_change(), wm_add_default(), wm_window_copy(), and WM_window_set_active_layout().
| bScreen * BKE_workspace_active_screen_get | ( | const WorkSpaceInstanceHook * | hook | ) |
Definition at line 614 of file workspace.cc.
References WorkSpaceInstanceHook::act_layout, and WorkSpaceLayout::screen.
Referenced by blender::ed::viewer_path::activate_geometry_node(), ANIM_deselect_keys_in_animation_editors(), area_docking_target(), area_join_cursor(), check_rendered_viewport_visible(), CTX_wm_window_set(), current_screen_compat(), do_versions_after_linking_280(), ED_area_init(), ED_screen_global_areas_refresh(), ED_screen_global_areas_sync(), ED_workspace_change(), ED_workspace_scene_data_sync(), blender::find_side_effect_nodes(), blender::ed::geometry::find_socket_log_contexts(), blender::find_socket_log_contexts(), blender::nodes::gizmos::foreach_active_gizmo_in_open_editors(), blender::ed::space_node::has_workbench_in_texture_color(), image_walk_id_all_users(), blender::nodes::node_can_sync_cache_clear(), blender::ed::viewer_path::update_active_geometry_nodes_viewer(), view3d_data_consistency_ensure(), window_manager_blend_write(), WM_window_get_active_screen(), WM_window_is_main_top_level(), and WM_window_set_active_view_layer().
| void BKE_workspace_active_screen_set | ( | WorkSpaceInstanceHook * | hook, |
| int | winid, | ||
| WorkSpace * | workspace, | ||
| bScreen * | screen ) |
Definition at line 618 of file workspace.cc.
References WorkSpaceInstanceHook::active, BKE_workspace_active_layout_set(), BKE_workspace_layout_find(), and winid.
Referenced by WM_window_set_active_screen().
| void BKE_workspace_active_set | ( | WorkSpaceInstanceHook * | hook, |
| WorkSpace * | workspace ) |
Definition at line 567 of file workspace.cc.
References WorkSpaceInstanceHook::act_layout, WorkSpaceInstanceHook::active, WorkSpace::hook_layout_relations, and workspace_relation_get_data_matching_parent().
Referenced by do_version_workspaces_after_lib_link(), ED_screens_init(), ED_workspace_change(), window_manager_foreach_id(), wm_add_default(), wm_close_and_free(), wm_file_read_setup_wm_keep_old(), wm_window_copy(), and WM_window_open().
Definition at line 319 of file workspace.cc.
References BKE_id_new(), WorkSpace::id, id_us_ensure_real(), and name.
Referenced by do_version_workspaces_create_from_screens(), and ED_workspace_add().
| void BKE_workspace_id_tag_all_visible | ( | Main * | bmain, |
| int | tag ) |
Definition at line 547 of file workspace.cc.
References BKE_main_id_tag_listbase(), BKE_workspace_active_get(), ListBase::first, WorkSpace::id, LISTBASE_FOREACH, ID::tag, wmWindowManager::windows, Main::wm, and Main::workspaces.
Referenced by blender::ed::outliner::id_delete_tag(), and WM_toolsystem_refresh_active().
| WorkSpaceInstanceHook * BKE_workspace_instance_hook_create | ( | const Main * | bmain, |
| int | winid ) |
Definition at line 339 of file workspace.cc.
References BKE_workspace_active_layout_set(), ListBase::first, MEM_callocN(), winid, and Main::workspaces.
Referenced by do_version_workspaces_after_lib_link(), and wm_window_new().
| void BKE_workspace_instance_hook_free | ( | const Main * | bmain, |
| WorkSpaceInstanceHook * | hook ) |
Definition at line 353 of file workspace.cc.
References BLI_assert, BLI_listbase_is_empty(), ListBase::first, G, MEM_freeN(), workspace_relation_remove(), and Main::workspaces.
Referenced by wm_window_free().
| WorkSpaceLayout * BKE_workspace_layout_add | ( | Main * | bmain, |
| WorkSpace * | workspace, | ||
| bScreen * | screen, | ||
| const char * | name ) |
Add a new layout to workspace for screen.
Definition at line 380 of file workspace.cc.
References BLI_addtail(), BLI_assert, bScreen::id, id_us_plus(), WorkSpace::layouts, MEM_callocN(), name, WorkSpaceLayout::screen, UNUSED_VARS, workspace_layout_name_set(), and workspaces_is_screen_used().
Referenced by do_version_workspaces_create_from_screens(), and ED_workspace_layout_add().
| WorkSpaceLayout * BKE_workspace_layout_find | ( | const WorkSpace * | workspace, |
| const bScreen * | screen ) |
Definition at line 429 of file workspace.cc.
References bScreen::id, WorkSpace::id, ID::name, printf, and workspace_layout_find_exec().
Referenced by BKE_workspace_active_screen_set(), do_version_workspaces_after_lib_link(), ED_screen_change(), ED_workspace_screen_change_ensure_unused_layout(), screen_change_update(), and screen_delete_exec().
| WorkSpaceLayout * BKE_workspace_layout_find_global | ( | const Main * | bmain, |
| const bScreen * | screen, | ||
| WorkSpace ** | r_workspace ) |
Find the layout for screen without knowing which workspace to look in. Can also be used to find the workspace that contains screen.
| r_workspace | Optionally return the workspace that contains the looked up layout (if found). |
References ATTR_NONNULL, BKE_workspace_layout_find_global(), and BKE_workspace_layout_iter_circular().
Referenced by BKE_workspace_layout_find_global(), bpy_rna_context_temp_override_enter_ok_or_error(), bpy_rna_context_temp_set_screen_for_window(), wm_add_default(), and wm_file_read_setup_wm_keep_old().
| WorkSpaceLayout WorkSpaceLayout * BKE_workspace_layout_iter_circular | ( | const WorkSpace * | workspace, |
| WorkSpaceLayout * | start, | ||
| bool(* | callback )(const WorkSpaceLayout *layout, void *arg), | ||
| void * | arg, | ||
| bool | iter_backward ) |
Circular workspace layout iterator.
| callback | Custom function which gets executed for each layout. Can return false to stop iterating. |
| arg | Custom data passed to each callback call. |
Definition at line 470 of file workspace.cc.
References WorkSpace::layouts, LISTBASE_CIRCULAR_BACKWARD_BEGIN, LISTBASE_CIRCULAR_BACKWARD_END, LISTBASE_CIRCULAR_FORWARD_BEGIN, and LISTBASE_CIRCULAR_FORWARD_END.
Referenced by BKE_workspace_layout_find_global(), ED_workspace_layout_cycle(), and ED_workspace_screen_change_ensure_unused_layout().
| const char * BKE_workspace_layout_name_get | ( | const WorkSpaceLayout * | layout | ) |
Definition at line 628 of file workspace.cc.
References WorkSpaceLayout::name.
Referenced by ED_workspace_layout_duplicate().
| void BKE_workspace_layout_name_set | ( | WorkSpace * | workspace, |
| WorkSpaceLayout * | layout, | ||
| const char * | new_name ) |
Definition at line 632 of file workspace.cc.
References workspace_layout_name_set().
| void BKE_workspace_layout_remove | ( | Main * | bmain, |
| WorkSpace * | workspace, | ||
| WorkSpaceLayout * | layout ) |
Definition at line 399 of file workspace.cc.
References BKE_id_free(), BLI_freelinkN(), bScreen::id, id_us_min(), WorkSpace::layouts, and WorkSpaceLayout::screen.
Referenced by BKE_workspace_remove(), BLO_update_defaults_startup_blend(), ED_screen_state_toggle(), wm_window_close(), workspace_blend_read_after_liblink(), and workspace_layout_delete_doit().
| bScreen * BKE_workspace_layout_screen_get | ( | const WorkSpaceLayout * | layout | ) |
Definition at line 639 of file workspace.cc.
References WorkSpaceLayout::screen.
Referenced by ED_screen_change(), ED_screen_state_toggle(), ED_workspace_change(), ED_workspace_layout_cycle(), ED_workspace_layout_delete(), ED_workspace_layout_duplicate(), ED_workspace_screen_change_ensure_unused_layout(), screen_state_to_nonnormal(), wm_event_do_notifiers(), wm_window_close(), WM_window_open(), workspace_layout_delete_doit(), and workspace_layout_set_poll().
| bool BKE_workspace_owner_id_check | ( | const WorkSpace * | workspace, |
| const char * | owner_id ) |
Definition at line 537 of file workspace.cc.
References BLI_findstring(), WorkSpace::flags, name, offsetof, WorkSpace::owner_ids, and WORKSPACE_USE_FILTER_BY_ORIGIN.
Referenced by panel_add_check(), WM_gizmo_group_type_poll(), WM_keymap_poll(), and WM_menutype_poll().
| void BKE_workspace_relations_free | ( | ListBase * | relation_list | ) |
Definition at line 410 of file workspace.cc.
References ListBase::first, and workspace_relation_remove().
Referenced by workspace_free_data().
Remove workspace by freeing itself and its data. This is a higher-level wrapper that calls workspace_free_data (through BKE_id_free) to free the workspace data, and frees other data-blocks owned by workspace and its layouts (currently that is screens only).
Always use this to remove (and free) workspaces. Don't free non-ID workspace members here.
Definition at line 326 of file workspace.cc.
References BKE_id_free(), BKE_workspace_layout_remove(), ListBase::first, and WorkSpace::layouts.
| void BKE_workspace_status_clear | ( | WorkSpace * | workspace | ) |
Empty the Workspace status items to clear the status bar.
Definition at line 650 of file workspace.cc.
References WorkSpace::runtime.
Referenced by mesh_bisect_modal(), blender::ed::transform::viewRedrawPost(), workspace_free_data(), and WorkspaceStatus::WorkspaceStatus().
| void void BKE_workspace_tool_id_replace_table | ( | WorkSpace * | workspace, |
| const int | space_type, | ||
| const int | mode, | ||
| const char * | idname_prefix_skip, | ||
| const char * | replace_table[][2], | ||
| int | replace_table_num ) |
Replace tools ID's, intended for use in versioning code.
| space_type | The space-type to match bToolRef::space_type. |
| mode | The space-type to match bToolRef::mode. |
| idname_prefix_skip | Ignore when NULL, otherwise only operate on tools that have this text as the bToolRef::idname prefix, which is skipped before the replacement runs. This avoids having to duplicate a common prefix in the replacement text. |
| replace_table | An array of (source, destination) pairs. |
| replace_table_num | The number of items in replace_table. |
References ATTR_NONNULL, and BKE_workspace_tool_id_replace_table().
Referenced by BKE_workspace_tool_id_replace_table(), and blo_do_versions_300().
References ATTR_NONNULL, and BKE_workspace_tool_remove().
Referenced by BKE_workspace_tool_remove(), blo_do_versions_280(), and BLO_update_defaults_workspace().