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>2008-11-27 01:52:01 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-27 01:52:01 +0300
commit8e8e2c3ba9508e99ed4caa062b5d6cdf1a0f1914 (patch)
treeb03c35da06ac53fbdbb60009a5fa32cdf89df509 /source/blender/makesrna/intern/rna_lamp.c
parente384ad573ac71d065ad27e139039af0b711be8dd (diff)
RNA
* Added support for auto generating enum properties that are defined as bitflags mixed with other flags (use for shadow type in la->mode now).
Diffstat (limited to 'source/blender/makesrna/intern/rna_lamp.c')
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 6e086f5787d..46167cc7a5d 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -46,6 +46,11 @@ void RNA_def_lamp(BlenderRNA *brna)
{LA_HEMI, "HEMI", "Hemi", ""},
{LA_AREA, "AREA", "Area", ""},
{0, NULL, NULL, NULL}};
+ static EnumPropertyItem prop_shadow_items[] = {
+ {0, "NOSHADOW", "No Shadow", ""},
+ {LA_SHAD_BUF, "BUFSHADOW", "Buffer Shadow", "Lets spotlight produce shadows using shadow buffer."},
+ {LA_SHAD_RAY, "RAYSHADOW", "Ray Shadow", "Use ray tracing for shadow."},
+ {0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Lamp", "ID", "Lamp");
@@ -66,6 +71,11 @@ void RNA_def_lamp(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Color", "Lamp color.");
RNA_def_property_ui_range(prop, 0.0f , 1.0f, 10.0f, 3.0f);
+
+ prop= RNA_def_property(srna, "shadow", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mode", 1); /* use bitflags */
+ RNA_def_property_enum_items(prop, prop_shadow_items);
+ RNA_def_property_ui_text(prop, "Shadow", "Method to compute lamp shadow.");
}
#endif