From c72064272f7ef64070339a7622dc7305007de8c2 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Mon, 20 Jul 2009 20:34:14 +0000 Subject: 2.5 Lamps: * Replaced RNA ENUM hacks for "shadow method" and "shadow_ray_sampling_method" with modifications in the layout file. --- source/blender/makesrna/intern/rna_lamp.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'source') 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 @@ -389,31 +389,20 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) PropertyRNA *prop; 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); -- cgit v1.2.3