Looping animations in AnimationPlayer

Godot Version

v4.7.stable.mono.official [5b4e0cb0f]

Question

If you have AnimatedSprite2D, and set specific animation as looping, it will loop perfectly with every frame playing for the same amount of time.

If for one reason or another you need to use AnimationPlayer, your first instinct might be to set frame 0 on 0.0, last frame on 1.0, set animation update mode to continuous, and set animation as looping. But with this approach last frame will be “swallowed” since it’s set on 1.0, so it instantly goes back to 0.0.

The most obvious way out of this is to set animation update mode to discrete, and spread each frame on the time line so it plays for equal amount of time. But this approach feels kind of weird, since if you need to change amount of frames during development, you need to remake the time line every time. So the question is - is there a smarter way out of this?