import bpy
def get_dopesheet_area():
override_area = None
for screen in bpy.context.workspace.screens:
for area in screen.areas:
if area.type == "DOPESHEET_EDITOR":
return area
return None
override = bpy.context.copy()
override["area"] = get_dopesheet_area()
if override["area"] is not None:
bpy.ops.anim.channels_setting_enable(override, type='MUTE')
Ah you are right, I didn’t see that forum. The description of this one sounded like it belonged here.
Thanks a lot for the solution, it works but unfortunately it’s not practical in my case. Is there any way of achieving this without having to open the Action Editor?
You don’t need the action editor open, just send it the correct workspace. Instead of context.workspace, just use bpy.data.workspaces[‘Animation’] instead.