diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-04 14:00:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-04 19:40:33 +0300 |
commit | c43443d530bff67693dc2db4efdca6307703ce61 (patch) | |
tree | 40305a5fe154a25387c3fd3afcbfc560346bf383 /source/blender/windowmanager/intern/wm_draw.c | |
parent | 4e2228525fc9bbcff58e315c5e3bbc193cd63a0b (diff) |
Workspaces: store view layer per main window, instead of per workspace.
It was a bit odd that the scene was stored per window but not the view
layer. The reasoning was that you would use different view layers for
different tasks. This is still possible, but it's more predictable to
switch them both explicitly, and with child window support manually
syncing the view layers between multiple windows is no longer needed
as often.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_draw.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_draw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 5b88268f416..5314c434c4c 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -729,9 +729,8 @@ static void wm_draw_window(bContext *C, wmWindow *win) /* quick test to prevent changing window drawable */ static bool wm_draw_update_test_window(wmWindow *win) { - struct WorkSpace *workspace = WM_window_get_active_workspace(win); Scene *scene = WM_window_get_active_scene(win); - ViewLayer *view_layer = BKE_workspace_view_layer_get(workspace, scene); + ViewLayer *view_layer = WM_window_get_active_view_layer(win); struct Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); bScreen *screen = WM_window_get_active_screen(win); ARegion *ar; |