Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-24 16:20:17 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-26 18:06:14 +0300
commit67b014af484ad4ba6667e3cf9907422bedc8238a (patch)
tree68408128f8377b864c7b77be7c91b1fcead601b7 /source/blender/editors/space_topbar
parentc490428bd4dff75fb371777d4e95ea270c77ea94 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_topbar')
-rw-r--r--source/blender/editors/space_topbar/space_topbar.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/space_topbar/space_topbar.c b/source/blender/editors/space_topbar/space_topbar.c
index fa39d89091c..a8555e9e269 100644
--- a/source/blender/editors/space_topbar/space_topbar.c
+++ b/source/blender/editors/space_topbar/space_topbar.c
@@ -178,16 +178,20 @@ static void topbar_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa)
}
}
-static void topbar_header_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar),
- wmNotifier *UNUSED(wmn), const Scene *UNUSED(scene))
+static void topbar_header_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar,
+ wmNotifier *wmn, const Scene *UNUSED(scene))
{
/* context changes */
-#if 0
switch (wmn->category) {
- default:
+ case NC_SCREEN:
+ if (wmn->data == ND_LAYER)
+ ED_region_tag_redraw(ar);
+ break;
+ case NC_SCENE:
+ if (wmn->data == ND_SCENEBROWSE)
+ ED_region_tag_redraw(ar);
break;
}
-#endif
}
static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)