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
53 stars 5 forks source link

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

Closed Bindernews closed 1 year ago

Bindernews commented 1 year 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 1 year ago

Looks good to me, thanks!