diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-08 13:14:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-08 13:14:26 +0300 |
commit | 345c6298e995ea618c34282ba6d7ab5af032f191 (patch) | |
tree | f4fbc4798e17d0f19efc28b51a41425d0c552be8 /source/blender/makesrna/intern/rna_workspace.c | |
parent | 14a19fed788af0cf3695eb5def92510841056e08 (diff) |
Object Mode: move to workspace struct
- Read-only access can often use EvaluationContext.object_mode
- Write access to go to WorkSpace.object_mode.
- Some TODO's remain (marked as "TODO/OBMODE")
- Add-ons will need updating
(context.active_object.mode -> context.workspace.object_mode)
- There will be small/medium issues that still need resolving
this does work on a basic level though.
See D3037
Diffstat (limited to 'source/blender/makesrna/intern/rna_workspace.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c index 0bed91f2807..5e0a4b97981 100644 --- a/source/blender/makesrna/intern/rna_workspace.c +++ b/source/blender/makesrna/intern/rna_workspace.c @@ -121,6 +121,10 @@ static void rna_def_workspace(BlenderRNA *brna) "rna_workspace_transform_orientations_item_get", NULL, NULL, NULL, NULL); RNA_def_property_ui_text(prop, "Transform Orientations", ""); + 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"); + /* View Render */ prop = RNA_def_property(srna, "view_render", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); |