When I run the following script, current_frame is set AFTER the render.opengl():
bpy.context.area.type = 'VIEW_3D'
bpy.context.scene.frame_current = 234
bpy.data.scenes['Scene'].frame_current = 234
bpy.ops.render.opengl(view_context=False)
If I run the script again, the correct frame is rendered. How can I force the frame_current to be applied before the render?
(A solution without using an operator is also welcome, as I understand that ops are more for user interaction that for scripts and are therefor very dependent on the correct context.)
Thanks!
bpy.context.scene.frame_set(234)
to change the frame before rendering. See this answer: blender.stackexchange.com/questions/8387/… $\endgroup$