diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-27 01:52:01 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-27 01:52:01 +0300 |
commit | 8e8e2c3ba9508e99ed4caa062b5d6cdf1a0f1914 (patch) | |
tree | b03c35da06ac53fbdbb60009a5fa32cdf89df509 /source/blender/makesrna/intern/rna_define.c | |
parent | e384ad573ac71d065ad27e139039af0b711be8dd (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_define.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 63df7252e9e..709c42f8dca 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -519,7 +519,7 @@ PropertyRNA *RNA_def_property(StructRNA *srna, const char *identifier, int type, } case PROP_ENUM: DefRNA.silent= 1; - RNA_def_property_enum_sdna(prop, NULL, identifier); + RNA_def_property_enum_sdna(prop, NULL, identifier, 0); DefRNA.silent= 0; break; case PROP_POINTER: @@ -953,7 +953,7 @@ void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, cons rna_def_property_sdna(prop, structname, propname); } -void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname) +void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname, int bitflags) { PropertyDefRNA *dp; StructRNA *srna= DefRNA.laststruct; @@ -970,6 +970,8 @@ void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const } if((dp=rna_def_property_sdna(prop, structname, propname))) { + dp->enumbitflags= bitflags; + if(prop->arraylength) { prop->arraylength= 0; if(!DefRNA.silent) { |