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/makesdna/DNA_workspace_types.h | |
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/makesdna/DNA_workspace_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_workspace_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h index 1fc6acb8c2c..11a67692b8b 100644 --- a/source/blender/makesdna/DNA_workspace_types.h +++ b/source/blender/makesdna/DNA_workspace_types.h @@ -84,6 +84,7 @@ typedef struct WorkSpace { /* Store for each hook (so for each window) which layout has * been activated the last time this workspace was visible. */ ListBase hook_layout_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */ + ListBase scene_viewlayer_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */ /* Custom transform orientations */ ListBase transform_orientations DNA_PRIVATE_WORKSPACE; |