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-10-14 23:19:43 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-14 23:19:43 +0400
commit991e67ddc756cdbf6e85b9a0520792d1f48026e4 (patch)
treeca930274523e3355cfda68939b45525c1bed93d0 /source/blender/editors/object/object_group.c
parent96d2dc7d090975687e5b99495fcc1e5725e75120 (diff)
RNA:
* Enums with an _itemf callback now never get context NULL passed in, rather a fixed list of enum items are defined which should contain all items (if possible), from which the _itemf callback can then use a subset.
Diffstat (limited to 'source/blender/editors/object/object_group.c')
-rw-r--r--source/blender/editors/object/object_group.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index c83f3022c7c..198838d6f05 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -275,18 +275,14 @@ static EnumPropertyItem group_items[]= {
static EnumPropertyItem *group_itemf(bContext *C, PointerRNA *ptr, int *free)
{
+ Main *bmain= CTX_data_main(C);
+ Group *group;
EnumPropertyItem tmp = {0, "", 0, "", ""};
EnumPropertyItem *item= NULL;
- Main *bmain;
- Group *group;
int a, totitem= 0;
- if(!C) /* needed for docs */
- return group_items;
-
RNA_enum_items_add_value(&item, &totitem, group_items, -1);
- bmain= CTX_data_main(C);
if(bmain->group.first)
RNA_enum_item_add_separator(&item, &totitem);
@@ -298,7 +294,6 @@ static EnumPropertyItem *group_itemf(bContext *C, PointerRNA *ptr, int *free)
}
RNA_enum_item_end(&item, &totitem);
-
*free= 1;
return item;