From adae794233e168aa4046b560c43db6b48725cc08 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 24 Aug 2010 06:40:28 +0000 Subject: py/rna remove functions now all work in a similar way. - some remove() functions took an int argument rather then the item to remove. - disallow None argument. - raise an error if the item isnt in the collection. --- source/blender/makesrna/intern/rna_color.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (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 ba3f2b09a20..89f3e459105 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -465,9 +465,8 @@ static void rna_def_color_ramp_element_api(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "remove", "rna_ColorRampElement_remove"); RNA_def_function_ui_description(func, "Delete element from ColorRamp"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - //parm= RNA_def_int(func, "index", 0, 0, 31, "Index", "Element to delete.", 0, 31); parm= RNA_def_pointer(func, "element", "ColorRampElement", "", "Element to remove."); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); } static void rna_def_color_ramp(BlenderRNA *brna) -- cgit v1.2.3