poohcom1 / godot-animated-sprite-2-player

A Godot addon to convert animated sprite frames to animations in an animation player.
https://godotengine.org/asset-library/asset/1605
MIT License
41 stars 3 forks source link

Fix conversion not respecting frame duration when setting animation length #8

Closed Bindernews closed 10 months ago

Bindernews commented 10 months ago

When calculating the overall animation length, add_animation assumes 1 frame = 1 fps, but frames can have different durations. This is handled correctly when adding keyframes, but not when setting the overall animation length. This PR fixes the above issue.

poohcom1 commented 10 months ago

Looks good to me, thanks!