Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2010-04-04 16:09:59 +0400
committerThomas Dinges <blender@dingto.org>2010-04-04 16:09:59 +0400
commitd574e8b82617c389de85a09fcf9b0f14172466a8 (patch)
tree14ae0ae8d3939d471e9b4c8ef406dcd7336b1027 /source/blender/makesrna/intern/rna_material.c
parent426aaaa0a29ea2ddaf008142752fc1efb91033f0 (diff)
2.5 Preview Render:
* Converted Type Buttons (Flat, Cube, Monkey etc.) in Material Preview to RNA. * "Alpha" option in texture Preview Render is back!
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r--source/blender/makesrna/intern/rna_material.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index b6a6f072c6b..4d47737038a 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -1486,6 +1486,16 @@ void RNA_def_material(BlenderRNA *brna)
{MA_ZTRANSP, "Z_TRANSPARENCY", 0, "Z Transparency", "Use alpha buffer for transparent faces"},
{MA_RAYTRANSP, "RAYTRACE", 0, "Raytrace", "Use raytracing for transparent refraction rendering"},
{0, NULL, 0, NULL, NULL}};
+
+ /* Render Preview Types */
+ static EnumPropertyItem preview_type_items[] = {
+ {MA_FLAT, "FLAT", ICON_MATPLANE, "Flat", "Preview type: Flat XY plane"},
+ {MA_SPHERE, "SPHERE", ICON_MATSPHERE, "Sphere", "Preview type: Sphere"},
+ {MA_CUBE, "CUBE", ICON_MATCUBE, "Flat", "Preview type: Cube"},
+ {MA_MONKEY, "MONKEY", ICON_MONKEY, "Flat", "Preview type: Monkey"},
+ {MA_HAIR, "HAIR", ICON_HAIR, "Flat", "Preview type: Hair strands"},
+ {MA_SPHERE_A, "SPHERE_A", ICON_MAT_SPHERE_SKY, "Flat", "Preview type: Large sphere with sky"},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Material", "ID");
RNA_def_struct_ui_text(srna, "Material", "Material datablock to defined the appearance of geometric objects for rendering");
@@ -1509,6 +1519,13 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Transparency Method", "Method to use for rendering transparency");
RNA_def_property_update(prop, 0, "rna_Material_update");
+ /* For Preview Render */
+ prop= RNA_def_property(srna, "preview_render_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "pr_type");
+ RNA_def_property_enum_items(prop, preview_type_items);
+ RNA_def_property_ui_text(prop, "Preview render type", "Type of preview render");
+ RNA_def_property_update(prop, 0, "rna_Material_update");
+
prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "amb");
RNA_def_property_range(prop, 0, 1);