From 1f551da12e1eb816a97997450afe5de852a7b78b Mon Sep 17 00:00:00 2001 From: Pullusb Date: Wed, 27 Oct 2021 18:53:39 +0200 Subject: [PATCH] show active layer obj conflict in ui 0.6.3 - fix: show in ui when there is an active dopesheet layer that is not in active object --- CHANGELOG.md | 4 ++++ __init__.py | 2 +- ui.py | 7 +++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2821794..650c23b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ Activate / deactivate layer opaticty according to prefix Activate / deactivate all masks using MA layers --> +0.6.3 + +- fix: show in ui when there is an active dopesheet layer that is not in active object + 0.6.2 - fix: problem sending all visible GP diff --git a/__init__.py b/__init__.py index 0883493..f36de0b 100644 --- a/__init__.py +++ b/__init__.py @@ -2,7 +2,7 @@ bl_info = { "name": "GP Render", "description": "Organise export of gp layers through compositor output", "author": "Samuel Bernou", - "version": (0, 6, 2), + "version": (0, 6, 3), "blender": (2, 93, 0), "location": "View3D", "warning": "", diff --git a/ui.py b/ui.py index 63414f1..4832da6 100644 --- a/ui.py +++ b/ui.py @@ -169,8 +169,11 @@ class GPEXP_PT_gp_dopesheet_ui(Panel): row = layout.row() row.label(text=f'Multiple users ({context.object.data.users})', icon='ERROR') row.operator("wm.call_menu", text="", icon='QUESTION').name = "GPEXP_MT_multi_user_doc" - layout.label(text=f'viewlayer: {context.object.data.layers.active.viewlayer_render}') - + if context.object.data.layers.active: + layout.label(text=f'viewlayer: {context.object.data.layers.active.viewlayer_render}') + else: + layout.label(text=f'No active layer found') + layout.label(text=f'(Active dopesheet layer not in active obj)') ## On layers if context.object and context.object.type == 'GPENCIL':