diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-21 16:27:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-30 17:10:03 +0300 |
commit | 9f78f471d7aeacd357349f0eb4b8f8bbc01db756 (patch) | |
tree | e6dd30928d9566ad86cf19658f691e3c78fe887c /source/blender/makesrna/intern/rna_workspace.c | |
parent | df8a7ec3a81394fef4a21a6f1c1e4a43d5d44fba (diff) |
Workspaces: switch object mode when switching workspaces.
In the workspace properties a mode can now be configured that is
automatically enabled when switching to the workspace.
This is a test to validate how well it works. The weak point is
that if you don't have an appropriate object already select it will
not switch modes.
See T56475.
Diffstat (limited to 'source/blender/makesrna/intern/rna_workspace.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c index db6a58fa85e..b9ca6412f7a 100644 --- a/source/blender/makesrna/intern/rna_workspace.c +++ b/source/blender/makesrna/intern/rna_workspace.c @@ -320,11 +320,9 @@ static void rna_def_workspace(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Active Tool Space", "Tool mode"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); -#if 0 prop = RNA_def_property(srna, "object_mode", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, rna_enum_object_mode_items); - RNA_def_property_ui_text(prop, "Mode", "Object interaction mode used in this window"); -#endif + RNA_def_property_enum_items(prop, rna_enum_workspace_object_mode_items); + RNA_def_property_ui_text(prop, "Object Mode", "Switch to this object mode when activating the workspace"); /* Flags */ prop = RNA_def_property(srna, "use_filter_by_owner", PROP_BOOLEAN, PROP_NONE); |