From dfd7b0d07aab232e17fb851c8d61c9c64b9f455f Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Thu, 28 Dec 2017 12:23:37 -0200 Subject: [PATCH] RNA: scene_collection.collections.new() name optional We already have a fallback naming system when no naming is given, we should use that. --- source/blender/makesrna/intern/rna_layer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c index f64cfef45df..c8c6c371a4d 100644 --- a/source/blender/makesrna/intern/rna_layer.c +++ b/source/blender/makesrna/intern/rna_layer.c @@ -991,8 +991,7 @@ static void rna_def_scene_collections(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_SceneCollection_new"); RNA_def_function_ui_description(func, "Add a collection to scene"); RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN); - parm = RNA_def_string(func, "name", "SceneCollection", 0, "", "New name for the collection (not unique)"); - RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_string(func, "name", NULL, 0, "", "New name for the collection (not unique)"); parm = RNA_def_pointer(func, "result", "SceneCollection", "", "Newly created collection"); RNA_def_function_return(func, parm);