Help with Quick Hack: Snap to second while scrubbing the frame in the timeline

I’ve been trying to work on this quick hack, to try to get started understanding Blender’s code: https://developer.blender.org/T53799

I’ve read through space_time.c and time_ops.c and I think I pretty much understand what they’re doing, but I can’t for the life of me find where it’s setting the current frame when you click in the timeline. There doesn’t seem to be an operator defined for it, or anything in the keymap.

Could anyone help point me in the right direction?

If you open blender with the --debug-wm option, you will see that the bpy.ops.anim.change_frame operator is called. And its real name is ANIM_OT_change_frame :wink:

4 Likes

Thanks! I didn’t know about the --debug-wm option. That will help a lot.