I have got a cube with 3 keyframes on frame 1, 24 and 48.
I want to scale the keyframes, but it scales from the center of the selected keyframes that is Frame 24.
How can I set the scaling to start from frame 1?
Here's the code I got.
import bpy
old_type = bpy.context.area.type
bpy.context.area.type = 'GRAPH_EDITOR'
bpy.ops.graph.interpolation_type(type='CONSTANT')
bpy.context.scene.frame_current = 1
bpy.ops.transform.resize(value=(2, 1, 1))
bpy.context.area.type = old_type