[Bf-blender-cvs] [e8c737d7c27] blender2.8: Outliner/Collections: Don't link a collection after creation

Dalai Felinto noreply at git.blender.org
Tue Jan 2 18:01:35 CET 2018


Commit: e8c737d7c27544695c2de45c8b4589317c04f5b6
Author: Dalai Felinto
Date:   Tue Jan 2 13:10:28 2018 -0200
Branches: blender2.8
https://developer.blender.org/rBe8c737d7c27544695c2de45c8b4589317c04f5b6

Outliner/Collections: Don't link a collection after creation

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

M	source/blender/editors/space_outliner/outliner_collections.c

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

diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index a01cfa4812a..7689131bad4 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -381,7 +381,6 @@ static int collection_nested_new_exec(bContext *C, wmOperator *op)
 	SpaceOops *soops = CTX_wm_space_outliner(C);
 	Main *bmain = CTX_data_main(C);
 	Scene *scene = CTX_data_scene(C);
-	ViewLayer *view_layer = CTX_data_view_layer(C);
 
 	struct CollectionNewData data = {
 		.error = false,
@@ -395,13 +394,11 @@ static int collection_nested_new_exec(bContext *C, wmOperator *op)
 		return OPERATOR_CANCELLED;
 	}
 
-	SceneCollection *scene_collection;
-	scene_collection = BKE_collection_add(
-	                       &scene->id,
-	                       data.scene_collection,
-	                       COLLECTION_TYPE_NONE,
-	                       NULL);
-	BKE_collection_link(view_layer, scene_collection);
+	BKE_collection_add(
+	            &scene->id,
+	            data.scene_collection,
+	            COLLECTION_TYPE_NONE,
+	            NULL);
 
 	outliner_cleanup_tree(soops);
 	DEG_relations_tag_update(bmain);



More information about the Bf-blender-cvs mailing list