From 2ba8b72157d22ee92359e87e88860443a1f5cef2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Jul 2009 19:33:59 +0000 Subject: RNA & PyAPI * support for dynamic enums to be inspected enumProp.items() from python. * fix, enums check for a separator was flipped, meant no enums were in docs. * dynamic enum functions now check for a NULL context and return all possible options for the "items" attribute used for docs. * added an arg for rna arrays to free the array there looping over (needed to free dynamically allocated enum items) * python api checks for NULL items since this can happen in some cases. * python api, When getting an enum ID from an int in an array - If it failed it would get the first enum identifier and return that. Brecht? dont understand, making it return an empty string in these cases. --- source/blender/makesrna/intern/rna_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_color.c') diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 179808ab66d..f4248d18db3 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -50,7 +50,7 @@ static void rna_CurveMapping_curves_begin(CollectionPropertyIterator *iter, Poin { CurveMapping *cumap= (CurveMapping*)ptr->data; - rna_iterator_array_begin(iter, cumap->cm, sizeof(CurveMap), rna_CurveMapping_curves_length(ptr), NULL); + rna_iterator_array_begin(iter, cumap->cm, sizeof(CurveMap), rna_CurveMapping_curves_length(ptr), 0, NULL); } static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value) -- cgit v1.2.3