From a6089f8238891580eae675d19d39b831dab82e02 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Sat, 15 Aug 2009 22:35:00 +0000 Subject: 2.5/Paint: * Added RNA for the object-localized modes --- source/blender/makesrna/intern/rna_object.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 2833e0da10d..5ad59661eaa 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -968,6 +968,12 @@ static void rna_def_object(BlenderRNA *brna) {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 @@ static void rna_def_object(BlenderRNA *brna) 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); -- cgit v1.2.3