smix8 / GodotAnimationRetargeting

Animation Retargeting module for Godot Game Engine
MIT License
129 stars 9 forks source link

Retarget Mode "current animation" is broken #4

Closed stryker313 closed 3 years ago

stryker313 commented 3 years ago

Basically, if the retarget mode is set to current animation, it doesn't actually do anything. It exports an animation player with nothing in it, and thats it. However, using retarget mode "animationplayer" exports ALL the animations, including the retargeted animation. Easy fix, but just a bug.

Steps to reproduce: retarget animation with retarget mode current animation set, and nothing will happen/empty animation player will be created.

Video: https://youtu.be/d35Vyxu3P34

smix8 commented 3 years ago

Did a looped animation play in the animationplayer?

This is a general issue with Godot. Internally what the retargeting tool does is calling the "get_current_animation" function of the AnimationPlayer. This function returns an empty String if the animation is paused or stopped and not playing or has reached the end of the playback range without begin set to loop.

EDIT: What I would count as a bug of the retargeting tool is if it creates an empty animationplayer in the export folder.

stryker313 commented 3 years ago

No looped animation plays. It does create an empty Animation Player in the export folder however, and does nothing else. I assumed current animation would export just the current animation.

smix8 commented 3 years ago

It does but the animation needs to be playing cause the animationplayer returns an empty string for the current animation if not.

As said the empty animationplayer is a bug, it should just stop the retargeting process and print a warning if the current animation is returned empty by the animationplayer.

Currently there is no other way (that I know of) to get the playing animation id except for the flawed get_current_animation function so the only workaround is error printing and documentation.

smix8 commented 3 years ago

Empty AnimationPlayer should be fixed by commit aefd333565e9672fc88e46c51ad11dc25b064131

Not much that I can do about the AnimationPlayer.get_current_animation() returning an empty String when the animation is not playing as this is a Godot quirk.

Class Documentation already documents this quirk, will add it to a know issues and quirks list later to highlight it more.

Closing this issue.