forked from bartvdbraak/blender
Small comit, added the colour mode (BW,RGB,RGBA) and object type to rna, and added appropriate entries to the UI
This commit is contained in:
parent
efd1a69d6c
commit
119d0e9145
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user