Small comit, added the colour mode (BW,RGB,RGBA) and object type to rna, and added...
authorMichael Fox <mfoxdogg@gmail.com>
Fri, 24 Apr 2009 01:17:54 +0000 (01:17 +0000)
committerMichael Fox <mfoxdogg@gmail.com>
Fri, 24 Apr 2009 01:17:54 +0000 (01:17 +0000)
release/ui/buttons_objects.py
release/ui/buttons_scene.py
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scene.c

index 9c1efacf10abef0751c602399ef27efda3dc44ba..f971d167f7f83aca6825049189b4495a7c719a74 100644 (file)
@@ -62,6 +62,9 @@ class OBJECT_PT_display(ObjectButtonsPanel):
 
                if not ob:
                        return
+                       
+               layout.row()
+               layout.itemR(ob, "type", text="Object Type")
 
                layout.row()
                layout.itemR(ob, "max_draw_type", text="Type")
index 3d52cfe2c28546b0b555a9ba22db74d28aa17e96..89945c1e5318cd8e56ee0350c3fe26947bc5834f 100644 (file)
@@ -53,6 +53,7 @@ class RENDER_PT_image(RenderButtonsPanel):
                
                layout.row()
                layout.itemR(rd, "quality")
+               layout.itemR(rd, "color_mode")
                
                layout.row()
                layout.itemR(rd, "placeholders")
index 1df01e4cabf69d726bf8b09c4535a01bfcc43884..157630704013189701f490d0e9cf8f703ef9f28e 100644 (file)
@@ -442,6 +442,20 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
                {PARVERT3, "VERTEX_3", "3 Vertices", ""},
                {PARBONE, "BONE", "Bone", ""},
                {0, NULL, NULL, NULL}};
+       
+       static EnumPropertyItem object_type_items[] = {
+               {OB_EMPTY, "EMPTY", "Empty", "An Empty/Null Object"},
+               {OB_MESH, "MESH", "Mesh", "A Mesh Object"},
+               {OB_CURVE, "CURVE", "Curve", "A Curve Object"},
+               {OB_SURF, "SURFACE", "Surface", "A Surface Object"},
+               {OB_FONT, "TEXT", "Text", "A Text Object"},
+               {OB_MBALL, "META", "Meta", "A Meta Object"},
+               {OB_LAMP, "LAMP", "Lamp", "A Lamp Object"},
+               {OB_CAMERA, "CAMERA", "Camera", "A Camera Object"},
+               {OB_WAVE, "WAVE", "Wave", "A Wave Object"},
+               {OB_LATTICE, "LATTICE", "Lattice", "A Lattice Object"},
+               {OB_ARMATURE, "ARMATURE", "Armature", "An Armature Object"},
+               {0, NULL, NULL, NULL}};
 
        static EnumPropertyItem empty_drawtype_items[] = {
                {OB_ARROWS, "ARROWS", "Arrows", ""},
@@ -519,6 +533,12 @@ static StructRNA *rna_def_object(BlenderRNA *brna)
        prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
        RNA_def_property_ui_text(prop, "Parent", "Parent Object");
 
+       prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "type");
+       RNA_def_property_enum_items(prop, object_type_items);
+       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+       RNA_def_property_ui_text(prop, "Type", "Type of Object.");
+       
        prop= RNA_def_property(srna, "parent_type", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "partype");
        RNA_def_property_enum_items(prop, parent_type_items);
index 5108bdabbc9d7d67a898fa4ab08873239c42948f..225d92a79a53faf6e8aa1e21258351d1215e2140 100644 (file)
@@ -181,6 +181,12 @@ void rna_def_scene_render_data(BlenderRNA *brna)
                {R_ALPHAKEY, "STRAIGHT", "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
                {0, NULL, NULL, NULL}};
                
+       static EnumPropertyItem color_mode_items[] ={
+               {R_PLANESBW, "BW", "BW", "Images are saved with BW (grayscale) data"},
+               {R_PLANES24, "RGB", "RGB", "Images are saved with RGB (color) data"},
+               {R_PLANES32, "RGBA", "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
+               {0, NULL, NULL, NULL}};
+               
        static EnumPropertyItem octree_resolution_items[] = {
                {64, "OCTREE_RES_64", "64", ""},
                {128, "OCTREE_RES_128", "128", ""},
@@ -210,6 +216,11 @@ void rna_def_scene_render_data(BlenderRNA *brna)
        RNA_def_struct_nested(brna, srna, "Scene");
        RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock.");
        
+       prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
+       RNA_def_property_enum_items(prop, color_mode_items);
+       RNA_def_property_ui_text(prop, "Colour Mode", "What Colour Mode images are saved in (BW, RGB, RGBA)");
+       
        prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "xsch");
        RNA_def_property_range(prop, 4, 10000);