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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 05992bbd22d..e27dace4ba5 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -118,6 +118,13 @@ static int buttons_context_path_scene(ButsContextPath *path)
static int buttons_context_path_view_layer(ButsContextPath *path, wmWindow *win)
{
+ PointerRNA *ptr = &path->ptr[path->len - 1];
+
+ /* View Layer may have already been resolved in a previous call (e.g. in buttons_context_path_linestyle). */
+ if (RNA_struct_is_a(ptr->type, &RNA_ViewLayer)) {
+ return 1;
+ }
+
if (buttons_context_path_scene(path)) {
Scene *scene = path->ptr[path->len - 1].data;
ViewLayer *view_layer = (win->scene == scene) ?