Files
Christoph Lendenfeld ab43c57a2a Anim: fps dependent frame display in animation editors
Currently, the frame scrub area shows different frame numbers based on
the zoom level. But they would not show frame 24 until you zoom in. Since 24
is the most used frame rate for animation that's inconvenient because you never
see the spot with the full second.

With this PR the numbers and lines depend on the frame rate, and will favor
full seconds, then divide by either 2, 3 or 5 to break down the number.

This works for most FPS values, however custom FPS may hit a prime number, in which case
this logic is aborted and the next step down when zooming in will be 1. This can
result in quite large gaps where no frame numbers are displayed. But I think the impact
will be small since large prime number frame rates are rare.

This patch also reduces UI jumping because the major lines will always be turned into minor lines before disappearing.
When zooming in, any minor line will become a major line eventually.

To reduce the bunching up of minor lines when dividing by a large prime number,
they are only drawn if the distance between them is large enough.

Note that the line drawing in the VSE is not quite following the zoom level. Since this doesn't use the code path i modified in this PR I left it as is. Info from the Sequencer module is appreciated.

Pull Request: https://projects.blender.org/blender/blender/pulls/143562
2025-09-13 20:09:31 +02:00
..