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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-21 04:55:20 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-21 04:55:20 +0400
commit1f4fa869e4877202fd91825f85be748fc3dfe50b (patch)
treec3fbbaf23568abe2b7c5d15d93ebb778f0ac003b /source/blender/makesrna/intern/rna_lamp.c
parent0aebd5f14475ef84b0095de4a8f034170b9aee75 (diff)
2.5: RNA & UI
* Revert lamp sampling/buffers change. The right enum items should be defined in RNA, not the layout, so that it works in outliner, python api too. * Also changed type popup to radio buttons again, and removed the icons. This is more consistent, and I don't think it's a good idea to start using icons for these things, too much clutter. * Replace Mesh with Normals panel in the mesh buttons. * Remove Material panel from mesh buttons. * Added name fields for shape/vgroup/vcol/uv. * Spacing tweak to Object and Bone names. * Fix some naming conflicts in RNA, with "name" and "type" properties being defined twice in the same struct. * context.scene.tool_settings -> context.tool_settings.
Diffstat (limited to 'source/blender/makesrna/intern/rna_lamp.c')
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index dd2681cb092..bbe3b1dedb3 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -280,11 +280,11 @@ static void rna_def_lamp(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {LA_LOCAL, "POINT", ICON_LAMP_POINT, "Point", "Omnidirectional point light source."},
- {LA_SUN, "SUN", ICON_LAMP_SUN, "Sun", "Constant direction parallel ray light source."},
- {LA_SPOT, "SPOT", ICON_LAMP_SPOT, "Spot", "Directional cone light source."},
- {LA_HEMI, "HEMI", ICON_LAMP_HEMI, "Hemisphere", "180 degree constant light source."},
- {LA_AREA, "AREA", ICON_LAMP_AREA, "Area", "Directional area light source."},
+ {LA_LOCAL, "POINT", 0, "Point", "Omnidirectional point light source."},
+ {LA_SUN, "SUN", 0, "Sun", "Constant direction parallel ray light source."},
+ {LA_SPOT, "SPOT", 0, "Spot", "Directional cone light source."},
+ {LA_HEMI, "HEMI", 0, "Hemi", "180 degree constant light source."},
+ {LA_AREA, "AREA", 0, "Area", "Directional area light source."},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Lamp", "ID");
@@ -390,19 +390,29 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
static EnumPropertyItem prop_shadow_items[] = {
{0, "NOSHADOW", 0, "No Shadow", ""},
+ {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem prop_spot_shadow_items[] = {
+ {0, "NOSHADOW", 0, "No Shadow", ""},
{LA_SHAD_BUF, "BUFFER_SHADOW", 0, "Buffer Shadow", "Lets spotlight produce shadows using shadow buffer."},
{LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow."},
{0, NULL, 0, NULL, NULL}};
-
+
static EnumPropertyItem prop_ray_sampling_method_items[] = {
{LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""},
{LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""},
- {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", "For Area lamps only."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem prop_spot_ray_sampling_method_items[] = {
+ {LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""},
+ {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""},
+ {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
{0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
- RNA_def_property_enum_items(prop, prop_shadow_items);
+ RNA_def_property_enum_items(prop, (spot)? prop_spot_shadow_items: prop_shadow_items);
RNA_def_property_ui_text(prop, "Shadow Method", "Method to compute lamp shadow with.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
@@ -419,7 +429,7 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
prop= RNA_def_property(srna, "shadow_ray_sampling_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ray_samp_method");
- RNA_def_property_enum_items(prop, prop_ray_sampling_method_items);
+ RNA_def_property_enum_items(prop, (area)? prop_spot_ray_sampling_method_items: prop_ray_sampling_method_items);
RNA_def_property_ui_text(prop, "Shadow Ray Sampling Method", "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);