diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-05 06:29:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-05 06:29:51 +0300 |
commit | 1b38effd5f270de0ef6b81fe78af4c63ed256e05 (patch) | |
tree | 39f7cbd5e81f29e3397c9bc8684be0b31135ac61 /source/blender/makesrna/intern/rna_workspace.c | |
parent | 143ece7199c20b231077273e4c16c7edd0bc4940 (diff) |
RNA: add access to tool mode
Diffstat (limited to 'source/blender/makesrna/intern/rna_workspace.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c index b9ca6412f7a..e900b51c4eb 100644 --- a/source/blender/makesrna/intern/rna_workspace.c +++ b/source/blender/makesrna/intern/rna_workspace.c @@ -236,6 +236,13 @@ static void rna_def_workspace_tool(BlenderRNA *brna) RNA_def_property_enum_items(prop, rna_enum_space_type_items); RNA_def_property_ui_text(prop, "Space Type", ""); + prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "mode"); + RNA_def_property_enum_items(prop, DummyRNA_DEFAULT_items); + RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_WorkSpace_tools_mode_itemf"); + RNA_def_property_ui_text(prop, "Tool Mode", ""); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_define_verify_sdna(0); prop = RNA_def_property(srna, "has_datablock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); @@ -310,14 +317,14 @@ static void rna_def_workspace(BlenderRNA *brna) prop = RNA_def_property(srna, "tools_space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "tools_space_type"); RNA_def_property_enum_items(prop, rna_enum_space_type_items); - RNA_def_property_ui_text(prop, "Active Tool Space", "Tool space type"); + RNA_def_property_ui_text(prop, "Active Tool Space", ""); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "tools_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "tools_mode"); RNA_def_property_enum_items(prop, DummyRNA_DEFAULT_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_WorkSpace_tools_mode_itemf"); - RNA_def_property_ui_text(prop, "Active Tool Space", "Tool mode"); + RNA_def_property_ui_text(prop, "Active Tool Mode", ""); RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "object_mode", PROP_ENUM, PROP_NONE); |