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
51 stars 4 forks source link

On further save after Import animation, Godot keeps reordering generated AnimationLibrary animations #11

Open hsandt opened 4 months ago

hsandt commented 4 months ago

After every Import animation (from animated sprite), I commit my new updated animation library.

But later, after some saving, playing, reopening project, I see that my animation library has changed again. I notice no content change so it must be just animation reordering, but it's annoying to see a non-change in VCS.

image

Maybe it's something to fix on Godot side? Unless we can easily do it on our side by calling some force save/refresh API, like ResourceSaver.save?

poohcom1 commented 4 months ago

It could also be related to some caching with animation libraries and the way the plugin handles resource changing since right now it's just directly updating the reference to an AnimationPlayer.

I have another plugin that also deals with animation libraries, and I've since found that the best way to handle it is using UndoRedo with very precise target, so everything goes through the editor (and possible whatever caching/saving mechanism it has).

Might be worth experimenting integrating UndeRedo with this plugin as well, but idk how much work that'll be or if it'll actually fix it.