Fix animation manager with empty objects

2.3.2

- fixed: Bug with animation manager when there is image.empty object in scene
gpv2
pullusb 2023-05-02 14:43:28 +02:00
parent 798afbe82a
commit 990b18f665
3 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,9 @@
# Changelog
2.3.2
- fixed: Bug with animation manager when there is empty object in scene
2.3.1
- changed: Animation manager show hints when animation is enabled: fully, partially or not at all.

View File

@ -4,7 +4,7 @@ bl_info = {
"name": "GP toolbox",
"description": "Tool set for Grease Pencil in animation production",
"author": "Samuel Bernou, Christophe Seux",
"version": (2, 3, 1),
"version": (2, 3, 2),
"blender": (3, 0, 0),
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
"warning": "",

View File

@ -1194,7 +1194,10 @@ def anim_status(objects) -> tuple((str, str)):
for o in objects:
## Skip object with no animation
if not (o.animation_data and o.animation_data.action) and not (o.data.animation_data and o.data.animation_data.action):
if not (o.animation_data and o.animation_data.action):
if o.type == 'EMPTY':
continue
if not (o.data.animation_data and o.data.animation_data.action):
continue
## Also skip hidden objects