RuntimeError: Operator bpy.ops.anim.change_frame.poll() Expected an timeline/ani
mation area to be active
Error: Python script fail, look in the console for now…
Is there any alternative? or a way to make the viewport the active window?
If drivers, constraints and other animation stuff doesn’t need to be updated with a frame change, you might also want to use
bpy.context.scene.frame_current = … in rare occasions.
If you want to insert a keyframe, then there are a couple ways to do so.
The easiest is probably to set the property you want to animate, then call e.g.