diff options
author | Julian Eisel <julian@blender.org> | 2022-07-07 18:51:18 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-07-07 19:08:18 +0300 |
commit | e0cc86978c0f72f57240214ccb6bc7fe71428827 (patch) | |
tree | 83e4dd74cc92adff699e2588fb28118212ec0dfd /source/blender/makesrna/intern/rna_workspace.c | |
parent | f9a805164a944c3b5762f07e535536b9f425651f (diff) |
Workspaces: Option to pin scene to a workspace
Adds a "Pin Scene" option to the workspace. When activated, the workspace will
remember the scene that was last activated in it, so that when switching back
to this workspace, the same scene will be reactivated. This is important for a
VSE workflow, so that users can switch between different workspaces displaying
a scene and thus a timeline for a specific task.
The option can be found in the Properties, Workspace tab. D11890 additionally
adds an icon for this to the scene switcher in the topbar.
The workspace data contains a pointer to the scene which is a UI to scene data
relation. When appending a workspace, the pointer is cleared.
Differential Revision: https://developer.blender.org/D9140
Reviewed by: Brecht Van Lommel, Bastien Montagne (no final accept, but was fine
with the general design earlier)
Diffstat (limited to 'source/blender/makesrna/intern/rna_workspace.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c index 0b6c3934985..4873831abce 100644 --- a/source/blender/makesrna/intern/rna_workspace.c +++ b/source/blender/makesrna/intern/rna_workspace.c @@ -413,6 +413,13 @@ static void rna_def_workspace(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Object Mode", "Switch to this object mode when activating the workspace"); + prop = RNA_def_property(srna, "use_pin_scene", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flags", WORKSPACE_USE_PIN_SCENE); + RNA_def_property_ui_text(prop, + "Pin Scene", + "Remember the last used scene for the workspace and switch to it " + "whenever this workspace is activated again"); + /* Flags */ prop = RNA_def_property(srna, "use_filter_by_owner", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); |