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/editors/screen/area.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/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 5cb440d315b..77e178bf0b2 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1482,7 +1482,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa) { WorkSpace *workspace = WM_window_get_active_workspace(win); const bScreen *screen = BKE_workspace_active_screen_get(win->workspace_hook); - Scene *scene = WM_window_get_active_scene(win); + ViewLayer *view_layer = WM_window_get_active_view_layer(win); ARegion *ar; rcti rect, overlap_rect; rcti window_rect; @@ -1542,7 +1542,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa) region_azones_add(screen, sa, ar, ar->alignment & ~RGN_SPLIT_PREV); } - WM_toolsystem_refresh_screen_area(workspace, scene, sa); + WM_toolsystem_refresh_screen_area(workspace, view_layer, sa); } static void region_update_rect(ARegion *ar) |