Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-01-02 18:10:28 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-01-02 18:10:45 +0300
commite8c737d7c27544695c2de45c8b4589317c04f5b6 (patch)
tree28e06d98aa858905df1332b803ff01242342f371 /source/blender/editors/space_outliner/outliner_collections.c
parentbbbdb27d658d7bad950376d12edee126c59f3628 (diff)
Outliner/Collections: Don't link a collection after creation
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_collections.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c13
1 files changed, 5 insertions, 8 deletions
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);