[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22485] branches/blender2.5/blender/source /blender/makesrna/intern/rna_object.c: 2.5/Paint:

Nicholas Bishop nicholasbishop at gmail.com
Sun Aug 16 00:35:02 CEST 2009


Revision: 22485
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22485
Author:   nicholasbishop
Date:     2009-08-16 00:35:00 +0200 (Sun, 16 Aug 2009)

Log Message:
-----------
2.5/Paint:

* Added RNA for the object-localized modes

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c	2009-08-15 22:28:48 UTC (rev 22484)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c	2009-08-15 22:35:00 UTC (rev 22485)
@@ -968,6 +968,12 @@
 		{OB_ARMATURE, "ARMATURE", 0, "Armature", ""},
 		{0, NULL, 0, NULL, NULL}};
 
+	static EnumPropertyItem mode_items[] = {
+		{OB_MODE_SCULPT, "SCULPT", 0, "Sculpt", ""},
+		{OB_MODE_VERTEX_PAINT, "VERTEX_PAINT", 0, "Vertex Paint", ""},
+		{OB_MODE_WEIGHT_PAINT, "WEIGHT_PAINT", 0, "Weight Paint", ""},
+		{0, NULL, 0, NULL, NULL}};
+
 	static EnumPropertyItem empty_drawtype_items[] = {
 		{OB_ARROWS, "ARROWS", 0, "Arrows", ""},
 		{OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""},
@@ -1036,6 +1042,11 @@
 	RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "Type", "Type of Object.");
 
+	prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+	RNA_def_property_enum_sdna(prop, NULL, "mode");
+	RNA_def_property_enum_items(prop, mode_items);
+	RNA_def_property_ui_text(prop, "Mode", "Object interaction mode.");
+
 	prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
 	RNA_def_property_array(prop, 20);





More information about the Bf-blender-cvs mailing list