Open z1dev opened 3 years ago
I don't see the static path as a bug, this behaviour is important for animation sharing and saving them without skeleton to apply them at runtime again on demand but I can understand that this behaviour is annoying for users that don't need this in a simpler project.
I think the real problem is usability and the lack of renaming feature for paths inside the animationplayer. Currently only the lower paths can be renamed manually inside the animationplayer trackeditor one by one in a tedious manner while the source node can not be changed without editing the animation textfile by hand. In an ideal world there would be a popup when moving animationplayers inside the editor that asks if the path and node names should change to the new position.
@AndreaCatania create a solution for the path renaming issue a while ago but it was discarded. https://github.com/godotengine/godot/pull/20733 Maybe it can be recycled? I think it is a good usability addition for everyone working a lot with skeleton animations in Godot.
I don't see the static path as a bug, this behaviour is important for animation sharing and saving them without skeleton to apply them at runtime again on demand but I can understand that this behaviour is annoying for users that don't need this in a simpler project.
I don't understand what this means because I'm new in Godot. What appears as a bug is moving nodes, then trying to revert things by moving them back and the animation is still broken.
I just tried reverting the move by pressing undo. The animations are still broken as the undo doesn't restore the old paths. Sadly reloading the scene doesn't fix this. If I then close the editor without saving anything, and loading the scene back, the paths are still the new ones, so they got saved, though I haven't given permission to the editor to do so. edit: this saving behavior seems arbitrary. I tried it again and this time it didn't save the wrong paths. Another addition: you have to select the AnimationPlayer after moving stuff inside another node to break the paths. Pressing undo before doing that keeps the old paths working.
I'm too new to be able to decide if this is expected behavior or not, but it would be helpful if the editor showed a warning of what's happening, and not just as cryptic error messages in the Output panel.
I see what you mean after playing around with your testscene.
To summarize the issues I encountered:
More detail what happens with the animation paths: In your testscene if you hover over the e.g. head bone track inside the AnimationPlayer trackeditor it will show and except the path "Armature/Skeleton:head" so it finds the skeleton head bone to animate your model.
This path means that starting at the Parent Node of the Animationplayer (not the Animationplayer) first we search for a Node named "Armature", then a node named "Skeleton" and inside the skeleton node for a (bone) subresource named "head".
This works fine, so why does it break when you move the nodes?
If you move all the nodes to the "MoveEverythingInHere" the animationtrack path is automatically updated to: "MoveEverythingInHereInOneStep/Armature/Skeleton:head" This does not work and the track is grey and disabled but why? The path expects the "MoveEverythingInHereInOneStep" as a child of the AnimationPlayer Parent Node but the AnimationPlayer is already a Child Node of "MoveEverythingInHereInOneStep". If you manually delete the ""MoveEverythingInHereInOneStep/" from each bone path or move the AnimationPlayer up one level as a Child Node of the "untitled1" Root Node the Animation works again.
I see. Thank you for the clarification! I'll avoid moving the player for now.
For reference, this issue was originally asked about on the Godot Forums: https://godotforums.org/discussion/25903/editor-animation-breaks-when-moving-every-node-inside-another
I'd just like to add that this bug also happens when using a scene with AnimationPlayer that references child nodes of the scene. In this case, if you reparent any of the instances of the scene in the editor, the animation paths for the scene gets reset to the absolute path from the root. The animation path in the scene gets set to the name of the scene instance that you just reparented, breaking all the other instances. This is compounded by the fact that it's easy to accidentally drop a new instance as a child to a selected node, which then breaks animations for all instances when you reparent it to the game node. So even if you manually change the paths in the scene, the next time you reparent an instance of the scene, the scene gets changed and the paths break.
(Dropping it here in case is helpful for anyone) Reparenting the nodes via right-click menu (instead of directly draggin) worked for me:
(I always forgot it, but is always a good idea to make things with the right click menu, from reparenting, moving things, rename, etc., Specially on nodes who deppends on different subresources).
PS: Stills present in 3.4.stable
Still present in 3.5 stable.
Godot version:
3.3 RC7 custom build 5fdb8b02e (happened in 2017 with older version too, according to a report. see description below)
OS/device including version:
Windows 10
Issue description:
Moving the AnimationPlayer in a basic scene imported from gltf, together with the armature and mesh to a new parent breaks all animation paths. This only happens if you select everything together and move them, or move things first and only then the player. Moving everything out of that parent doesn't fix the issue, the paths stay wrong. I tested this with a 3D model only, but same thing can happen with sprites given this Q&A from 2017.
I also tried just moving the AnimationPlayer alone. While it stops playing animations, the paths stay the same, and moving the player out of the new parent node fixes this. On the other hand, if the player is moved last, the paths get changed and stay broken.
Steps to reproduce:
Minimal reproduction project:
testproject.zip