diff options
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 31f25720f8d..07e0c124998 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -615,12 +615,12 @@ void WORLD_OT_new(wmOperatorType *ot) static int view_layer_add_exec(bContext *C, wmOperator *UNUSED(op)) { - WorkSpace *workspace = CTX_wm_workspace(C); + wmWindow *win = CTX_wm_window(C); Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = BKE_view_layer_add(scene, NULL); - if (workspace) { - BKE_workspace_view_layer_set(workspace, view_layer, scene); + if (win) { + WM_window_set_active_view_layer(win, view_layer); } DEG_id_tag_update(&scene->id, 0); |