In blender 2.82 I want to decimate all the f-curves in active action, how can I override the context to make the script work with Animation Nodes Script Node?
import bpy
if decimate:
bpy.context.area.type = 'GRAPH_EDITOR'
bpy.ops.graph.decimate(mode='RATIO', remove_ratio=0.92)