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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r--source/blender/makesrna/intern/rna_define.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 07515d3ad56..b651360eda0 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -2284,12 +2284,25 @@ void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem
*totitem= tot+1;
}
+void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
+{
+ static EnumPropertyItem sepr = {0, "", 0, NULL, NULL};
+ RNA_enum_item_add(items, totitem, &sepr);
+}
+
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item)
{
for(; item->identifier; item++)
RNA_enum_item_add(items, totitem, item);
}
+void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item, int value)
+{
+ for(; item->identifier; item++)
+ if(item->value == value)
+ RNA_enum_item_add(items, totitem, item);
+}
+
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
{
static EnumPropertyItem empty = {0, NULL, 0, NULL, NULL};