Outliner/Collections: Don't link a collection after creation
This commit is contained in:
parent
bbbdb27d65
commit
e8c737d7c2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue