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
path: root/source
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2009-07-21 00:34:14 +0400
committerThomas Dinges <blender@dingto.org>2009-07-21 00:34:14 +0400
commitc72064272f7ef64070339a7622dc7305007de8c2 (patch)
tree323068f07b4816e68368c3b591f63c0d1cd49af2 /source
parent9a9d118bbf7786b1c5c412bef651885e33709553 (diff)
2.5 Lamps:
* Replaced RNA ENUM hacks for "shadow method" and "shadow_ray_sampling_method" with modifications in the layout file.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index b83036be8fb..dd2681cb092 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -390,30 +390,19 @@ 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", ""},
- {0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_spot_ray_sampling_method_items[] = {
+ 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", ""},
+ {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", "For Area lamps only."},
{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, (spot)? prop_spot_shadow_items: prop_shadow_items);
+ RNA_def_property_enum_items(prop, 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);
@@ -430,7 +419,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, (area)? prop_spot_ray_sampling_method_items: prop_ray_sampling_method_items);
+ RNA_def_property_enum_items(prop, 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);