smix8 / GodotAnimationRetargeting

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

Change get_current_animation() to get_assigned_animation() #23

Closed smix8 closed 3 years ago

smix8 commented 3 years ago

Currently several functions check AnimationPlayer.get_current_animation() to e.g. start playback or find the animation to retarget. This function returns an empty String if the animation is not playing rightnow or has ended and is not looped. Since the Inspector in Godot also bugs out on all input field while an animation is running this creates the annoying requirement to constantly stop and start animations manually for retargeting.

Changing to AnimationPlayer.get_assigned_animation() makes it easier as this function also returnes the previous running animation if playback is stopped. It still requires that the animation was loaded and started ones in the AnimationPlayer. If in the editor the animationtrackeditor panel must be opened ones to set an assigned_animation.

smix8 commented 3 years ago

Changed with commit d4e970f64d58739faf736c20da357a3b75878219