Make outliner new collection operator work via viewport too

Technically this revert b3bcbc9e85. This however doesn't seem to be needed
any longer.
This commit is contained in:
Dalai Felinto 2018-01-26 19:33:28 -02:00
parent 5798345c99
commit 6634eb3490
1 changed files with 0 additions and 2 deletions

View File

@ -315,14 +315,12 @@ void OUTLINER_OT_collection_unlink(wmOperatorType *ot)
static int collection_new_exec(bContext *C, wmOperator *UNUSED(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);
SceneCollection *scene_collection = BKE_collection_add(&scene->id, NULL, COLLECTION_TYPE_NONE, NULL);
BKE_collection_link(view_layer, scene_collection);
outliner_cleanup_tree(soops);
DEG_relations_tag_update(bmain);
WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL);
return OPERATOR_FINISHED;