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-10 15:36:02 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-10 15:36:02 +0400
commit3496437585c79d590b18d423d1b34d93f226f296 (patch)
tree3487baf8ec4cac148802ed6ac46ce8186d6c9dc0 /source/blender/makesrna/intern/rna_rna.c
parent146a887b81b45ca92972e037976ccf9205da97ee (diff)
2.5:
* RNA: enum items with "" indentifier are now interpreted as separators. * Add Object menu: added consistent names, separators.
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r--source/blender/makesrna/intern/rna_rna.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 557d472afef..0b605db20cf 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -516,6 +516,13 @@ static int rna_StringProperty_max_length_get(PointerRNA *ptr)
return ((StringPropertyRNA*)prop)->maxlength;
}
+static int rna_enum_check_separator(CollectionPropertyIterator *iter, void *data)
+{
+ EnumPropertyItem *item= (EnumPropertyItem*)data;
+
+ return (item->identifier[0] != 0);
+}
+
static void rna_EnumProperty_items_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
@@ -524,7 +531,7 @@ static void rna_EnumProperty_items_begin(CollectionPropertyIterator *iter, Point
rna_idproperty_check(&prop, ptr);
eprop= (EnumPropertyRNA*)prop;
- rna_iterator_array_begin(iter, (void*)eprop->item, sizeof(eprop->item[0]), eprop->totitem, NULL);
+ rna_iterator_array_begin(iter, (void*)eprop->item, sizeof(eprop->item[0]), eprop->totitem, rna_enum_check_separator);
}
static void rna_EnumPropertyItem_identifier_get(PointerRNA *ptr, char *value)