[Bf-blender-cvs] [dfd7b0d07aa] blender2.8: RNA: scene_collection.collections.new() name optional

Dalai Felinto noreply at git.blender.org
Thu Dec 28 16:02:55 CET 2017


Commit: dfd7b0d07aab232e17fb851c8d61c9c64b9f455f
Author: Dalai Felinto
Date:   Thu Dec 28 12:23:37 2017 -0200
Branches: blender2.8
https://developer.blender.org/rBdfd7b0d07aab232e17fb851c8d61c9c64b9f455f

RNA: scene_collection.collections.new() name optional

We already have a fallback naming system when no naming is given, we should use that.

===================================================================

M	source/blender/makesrna/intern/rna_layer.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list