You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an AnimationPlayer uses an AnimationLibrary imported from a glTF, the key used for that library is by default the name of the glTF file, and the editor won't let you change it.
While it makes sense that the animations in the library can't be changed if it was imported, the key is a property of the player, not the library, so it should be editable.
I'm pretty sure it used to be possible to do so through the editor. As a workaround you can manually edit the .tscn file in a text editor, or use AnimationPlayer.rename_animation_library.
Steps to reproduce
Add an imported AnimationLibrary to an AnimationPlayer
The key used for the library is the name of the glTF file and cannot be changed.
Hi, I discussed this with @SaracenOne in a dm. As you may know, 4.0 hit RC just earlier today.
I've actually been mulling this issue over in the back of my head over the past couple months, so it's not been forgotten.
The main blocker is due to how the animation library keys/values are serialized in 4.0, attempting to rename or add an animation library to an imported AnimationPlayer node would cause all animations from all libraries to be embedded in the .tscn, which is not a good idea, so we can't easily just make the read-write at this time.
The recommended approach for 4.0 is going to be to have another copy of the model and set it to be import as "AnimationLibrary", and then assign that into your AnimationPlayer. This avoids the issue of animations being embedded in the scene, because Godot will reference the imported AnimationLibrary and will also allow you to change the key.
The downsides are: it may make you have a duplicate copy of each .glb with animations in your project, and having to restart the editor each time. The upside is: it works in 4.0 without any engine change.
I think I have an approach in mind, but it would require some slight compat breakage (but can be migrated forwards of course) so it's something we will try to get fixed in 4.1. We could then also add an import setting to change the default key as well. Still, it's worth keeping this issue open until we have a better system.
For a more technical explanation, right now an AnimationPlayer node is serialized like this:
Godot version
v4.0.alpha.custom_build [b523053]
System information
Linux (Fedora 36)
Issue description
If an AnimationPlayer uses an AnimationLibrary imported from a glTF, the key used for that library is by default the name of the glTF file, and the editor won't let you change it.
While it makes sense that the animations in the library can't be changed if it was imported, the key is a property of the player, not the library, so it should be editable.
I'm pretty sure it used to be possible to do so through the editor. As a workaround you can manually edit the
.tscn
file in a text editor, or useAnimationPlayer.rename_animation_library
.Steps to reproduce
Minimal reproduction project
LibraryKeys.zip
The text was updated successfully, but these errors were encountered: