[Bf-blender-cvs] [1b38effd5f2] blender2.8: RNA: add access to tool mode
Campbell Barton
noreply at git.blender.org
Fri Oct 5 05:30:20 CEST 2018
Commit: 1b38effd5f270de0ef6b81fe78af4c63ed256e05
Author: Campbell Barton
Date: Fri Oct 5 13:29:51 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB1b38effd5f270de0ef6b81fe78af4c63ed256e05
RNA: add access to tool mode
===================================================================
M source/blender/makesrna/intern/rna_workspace.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list