fix #5 animation manager for gp layer data
1.9.8 - fix: animation manager `GP anim on/off` also toggle layers animation datas
This commit is contained in:
+12
-3
@@ -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'}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user