bugfix animation data ui
2.3.3 - fixed: Bug with animation manager objects data
This commit is contained in:
@@ -1193,14 +1193,8 @@ def anim_status(objects) -> tuple((str, str)):
|
||||
on_count = off_count = count = 0
|
||||
|
||||
for o in objects:
|
||||
## Skip object with no animation
|
||||
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
|
||||
|
||||
## Skip hidden objects
|
||||
if o.hide_get() and o.hide_render:
|
||||
continue
|
||||
|
||||
@@ -1212,32 +1206,37 @@ def anim_status(objects) -> tuple((str, str)):
|
||||
# off_count += 1
|
||||
|
||||
### Consider All channels individually
|
||||
for grp in o.animation_data.action.groups:
|
||||
## Check if groups are muted
|
||||
if grp.mute:
|
||||
off_count += 1
|
||||
else:
|
||||
on_count += 1
|
||||
count += 1
|
||||
if o.animation_data and o.animation_data.action:
|
||||
for grp in o.animation_data.action.groups:
|
||||
## Check if groups are muted
|
||||
if grp.mute:
|
||||
off_count += 1
|
||||
else:
|
||||
on_count += 1
|
||||
count += 1
|
||||
|
||||
|
||||
for fcu in o.animation_data.action.fcurves:
|
||||
## Check if fcurves are muted
|
||||
if fcu.mute:
|
||||
off_count += 1
|
||||
else:
|
||||
on_count += 1
|
||||
count += 1
|
||||
for fcu in o.animation_data.action.fcurves:
|
||||
## Check if fcurves are muted
|
||||
if fcu.mute:
|
||||
off_count += 1
|
||||
else:
|
||||
on_count += 1
|
||||
count += 1
|
||||
|
||||
if o.type in ('GPENCIL', 'CAMERA'):
|
||||
if o.data.animation_data and o.data.animation_data.action:
|
||||
## Check if object data attributes fcurves are muted
|
||||
for fcu in o.animation_data.action.fcurves:
|
||||
if fcu.mute:
|
||||
off_count += 1
|
||||
else:
|
||||
on_count += 1
|
||||
count += 1
|
||||
datablock = o.data
|
||||
if datablock.animation_data is None:
|
||||
continue
|
||||
if not datablock.animation_data.action:
|
||||
continue
|
||||
## Check if object data attributes fcurves are muted
|
||||
for fcu in datablock.animation_data.action.fcurves:
|
||||
if fcu.mute:
|
||||
off_count += 1
|
||||
else:
|
||||
on_count += 1
|
||||
count += 1
|
||||
|
||||
if not on_count and not off_count:
|
||||
return ('BLANK1', 'BLANK1') # 'NONE'
|
||||
|
||||
Reference in New Issue
Block a user