Workspaces: active view layer now always comes from workspace, not scene.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 24 Apr 2018 13:20:17 +0000 (15:20 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 26 Apr 2018 15:06:14 +0000 (17:06 +0200)
commit67b014af484ad4ba6667e3cf9907422bedc8238a
tree68408128f8377b864c7b77be7c91b1fcead601b7
parentc490428bd4dff75fb371777d4e95ea270c77ea94
Workspaces: active view layer now always comes from workspace, not scene.

Both the scene and workspace had an active view layer, and it was confusing
which settings were being used or displayed where. Now we always have one,
so there is no mismatch.

The "View Layers" tab in the properties editor is now "View Layer", no longer
showing a list of layers. Instead view layers can be added and removed with
the workspace view layer selector. They are also listed and selectable in the
outliner.

Single layer rendering uses the active view layer from the workspace.

This fixes bugs where the wrong active view layer was used, but more places
remain that are wrong and are now using the first view layer in the scene.
These are all marked with BKE_view_layer_context_active_PLACEHOLDER.
59 files changed:
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
release/scripts/startup/bl_operators/freestyle.py
release/scripts/startup/bl_ui/properties_freestyle.py
release/scripts/startup/bl_ui/properties_view_layer.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_topbar.py
source/blender/blenkernel/BKE_layer.h
source/blender/blenkernel/BKE_linestyle.h
source/blender/blenkernel/BKE_scene.h
source/blender/blenkernel/intern/blendfile.c
source/blender/blenkernel/intern/layer.c
source/blender/blenkernel/intern/linestyle.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/tracking.c
source/blender/blenloader/intern/versioning_280.c
source/blender/depsgraph/intern/builder/deg_builder_nodes_view_layer.cc
source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
source/blender/editors/object/object_bake_api.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/scene/scene_edit.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_topbar/space_topbar.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_layer.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
source/blender/nodes/shader/node_shader_tree.c
source/blender/nodes/texture/node_texture_tree.c
source/blender/render/extern/include/RE_bake.h
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/source/external_engine.c
source/blender/render/intern/source/pipeline.c
tests/python/view_layer/test_evaluation_selectability_a.py
tests/python/view_layer/test_evaluation_selectability_b.py
tests/python/view_layer/test_evaluation_selectability_c.py
tests/python/view_layer/test_evaluation_selectability_d.py
tests/python/view_layer/test_evaluation_selectability_e.py
tests/python/view_layer/test_evaluation_selectability_f.py
tests/python/view_layer/test_evaluation_visibility_a.py
tests/python/view_layer/test_evaluation_visibility_b.py
tests/python/view_layer/test_evaluation_visibility_c.py
tests/python/view_layer/test_evaluation_visibility_d.py
tests/python/view_layer/test_evaluation_visibility_e.py
tests/python/view_layer/test_evaluation_visibility_f.py
tests/python/view_layer/test_object_copy.py
tests/python/view_layer/test_object_link_b.py
tests/python/view_layer/test_operator_context.py
tests/python/view_layer/view_layer_common.py