[Bf-blender-cvs] [c86be7345b5] blender2.8: Tool System: expose tool space-type

Campbell Barton noreply at git.blender.org
Thu Apr 26 17:58:42 CEST 2018


Commit: c86be7345b5338544e32197ae7c852361f747a7c
Author: Campbell Barton
Date:   Thu Apr 26 17:56:09 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBc86be7345b5338544e32197ae7c852361f747a7c

Tool System: expose tool space-type

===================================================================

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 30670c83ba8..47c8254b015 100644
--- a/source/blender/makesrna/intern/rna_workspace.c
+++ b/source/blender/makesrna/intern/rna_workspace.c
@@ -192,6 +192,12 @@ static void rna_def_workspace(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Active Tool Index", "Tool group index");
 	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 
+	prop = RNA_def_property(srna, "tool_space_type", PROP_ENUM, PROP_NONE);
+	RNA_def_property_enum_sdna(prop, NULL, "tool.spacetype");
+	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_clear_flag(prop, PROP_EDITABLE);
+
 	prop = RNA_def_property(srna, "owner_ids", PROP_COLLECTION, PROP_NONE);
 	RNA_def_property_struct_type(prop, "wmOwnerID");
 	RNA_def_property_ui_text(prop, "UI Tags", "");



More information about the Bf-blender-cvs mailing list