fix #5 animation manager for gp layer data

1.9.8

- fix: animation manager `GP anim on/off` also toggle layers animation datas
gpv2
Pullusb 2022-03-04 02:18:41 +01:00
parent 8404e16633
commit 26c71f7bb3
3 changed files with 17 additions and 4 deletions

View File

@ -1,5 +1,9 @@
# Changelog
1.9.8
- fix: animation manager `GP anim on/off` also toggle layers animation datas
1.9.7
- changed: `list modifiers visibility conflict` (used in `check file` or through search menu) now not limited to GP objects type.

View File

@ -377,6 +377,12 @@ class GPTB_OT_toggle_mute_animation(bpy.types.Operator):
self.selection = event.shift
return self.execute(context)
def disable_action(self, act):
for i, fcu in enumerate(act.fcurves):
print(i, fcu.data_path, fcu.array_index)
# fcu.group don't have mute attribute in api.
fcu.mute = self.mute
def execute(self, context):
if self.selection:
@ -396,9 +402,12 @@ class GPTB_OT_toggle_mute_animation(bpy.types.Operator):
if not act:
continue
for i, fcu in enumerate(act.fcurves):
print(i, fcu.data_path, fcu.array_index)
fcu.mute = self.mute
self.disable_action(act)
if o.type == 'GPENCIL' and o.data.animation_data:
gp_act = o.data.animation_data.action
if gp_act:
self.disable_action(gp_act)
return {'FINISHED'}

View File

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