From 67b014af484ad4ba6667e3cf9907422bedc8238a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 24 Apr 2018 15:20:17 +0200 Subject: 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. --- source/blender/editors/space_node/node_edit.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'source/blender/editors/space_node') diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 340184845b8..d91c330c853 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -675,22 +675,6 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node) /* addnode() doesnt link this yet... */ node->id = (ID *)BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node"); } - else if (node->type == CMP_NODE_R_LAYERS) { - Scene *scene; - - for (scene = bmain->scene.first; scene; scene = scene->id.next) { - if (scene->nodetree && scene->use_nodes && ntreeHasTree(scene->nodetree, ntree)) { - if (node->id == NULL || node->id == (ID *)scene) { - int num_layers = BLI_listbase_count(&scene->view_layers); - scene->active_view_layer = node->custom1; - /* Clamp the value, because it might have come from a different - * scene which could have more render layers than new one. - */ - scene->active_view_layer = min_ff(scene->active_view_layer, num_layers - 1); - } - } - } - } else if (node->type == CMP_NODE_COMPOSITE) { if (was_output == 0) { bNode *tnode; -- cgit v1.2.3