smix8 / GodotAnimationRetargeting

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

Trackpath auto-adjust not working properly on non-default AnimationPlayer #16

Closed smix8 closed 3 years ago

smix8 commented 3 years ago

Moving AnimationPlayers with bonetracks is actually broken in Godot. The animationtracks are all renamed wrong. Related issues seem to be open for months and years without fixing.

The new auto-rename of the retargeting tool tries to fix this if child structure is different between source and target, e.g. if your animationplayer path is "TopNode/Skeleton/SubNode:bone" and your target animationplayer has "Skeleton/SubNode:bone" it will automatically try to adjust all trackpaths.

Currently this only works on child nodes with a subnode paths but does not work properly when the AnimationPlayer is moved to a parent or sibling level or the root is changed compared to the default after the skeleton asset import.

Since all the returned Nodepaths could have plenty of added dots depending on parent and child position or resources a lot can go wrong and a lot of adjustments are required to make the renaming work more reliable.

smix8 commented 3 years ago

Fixed by commit a5f864a11ae3bf6d07df0caa1dea83ebc8c1f877 for Godot 3.x and commit 62085ae4cc513b1a8bc3e3f5081c12f23502caaf for Godot 3.x GDScript.