I'm developing an addon that need to capture the position of the same object in one and other frame. Actually I had to create four buttons for it, one to put on start frame, other to end frame, other to capture start frame positions and other to capture end frame positions. I tryied to do it in one command:
import bpy frame1 = bpy.data.scenes["Scene"].frame_start bpy.context.scene.frame_current = frame1 bpy.ops.object.capture_object_start_position() frame2 = bpy.data.scenes["Scene"].frame_end bpy.context.scene.frame_current = frame2 bpy.ops.object.capture_object_end_position()
I tryied to put the commands update() and redraw() but it doesnt works, I read in some places that the problem is in the way of Blender works with the bpy.ops.* commands.
Thanks for the attention.