I'm trying to write a modal operator for the timeline, but I'm confused about how to get the current frame cursor in the timeline to follow a 'mousemove' event (and consequently, how to set the new current frame when the operator finishes).
1 Answer
Solved - in the invoke() function, I set these:
self._initial_mouse = event.mouse_x
self._initial_frame = scene.frame_current
in modal():
self.offset = (self._initial_mouse - event.mouse_x) * -0.1
scene.frame_current = self._initial_frame + self.offset