diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-12-01 17:47:24 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-12-01 18:15:30 +0300 |
commit | e8c15e0ed15f8369d0d0f706b4953fb64e357902 (patch) | |
tree | 0eb072454c535b438caf8eed3033d27b3c17e99b /source/blender/editors/include | |
parent | 983b1a34783e9600731b973ba52ecc8924bff169 (diff) |
Workspaces: Store an active view-layer per scene
Instead of storing a single active view-layer in the workspace, one is
stored for each scene the workspace showed before.
With this, some things become possible:
* Multiple windows in the same workspace but showing different scenes.
* Toggling back and forth scene keeps same active view-layer for each scene.
* Activating workspace which didn't show current scene before, the current view-layer is kept.
A necessary evil for this is that accessing view-layer and object mode
from .py can't be done via workspace directly anymore. It has to be done
through the window, so RNA can use the correct scene.
So instead of `workspace.view_layer`, it's `window.view_layer` now (same
with mode) even though it's still workspace data.
Fixes T53432.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index c1655cbccc2..23e65011387 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -136,6 +136,7 @@ void ED_screen_preview_render(const struct bScreen *screen, int size_x, int s struct WorkSpace *ED_workspace_add( struct Main *bmain, const char *name, + Scene *scene, ViewLayer *act_render_layer, struct ViewRender *view_render) ATTR_NONNULL(); bool ED_workspace_change( @@ -152,7 +153,8 @@ bool ED_workspace_delete( void ED_workspace_scene_data_sync( struct WorkSpaceInstanceHook *hook, Scene *scene) ATTR_NONNULL(); void ED_workspace_view_layer_unset( - const struct Main *bmain, const ViewLayer *layer_unset, ViewLayer *layer_new) ATTR_NONNULL(1, 2); + const struct Main *bmain, struct Scene *scene, + const ViewLayer *layer_unset, ViewLayer *layer_new) ATTR_NONNULL(1, 2); struct WorkSpaceLayout *ED_workspace_layout_add( struct WorkSpace *workspace, struct wmWindow *win, |