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
When adding a new animation library, the existing animation library imported from the .glb file is automatically changed from foreign to built-in upon saving, without any prompt or understandable reason. I believe this is a bug.
This results in losing the link between the .glb and the .tscn, now if animations are changed in the .glb they won't be updated in the .tscn.
Expected behaviour:
When adding a new animation library, the existing animation library imported from the .glb file does not change its type (if not possible, at least the animation(s) should not change its type).
Steps to reproduce
Using the project attached, do the following:
Click on the AnimationPlayer of model.tscn, this displays the animation "Action" from the imported model.
Click on the button "Animation"
Click on "Manage Animations", and notice that the existing animation library is set as "foreign" (imported from model.glb)
Click on "Add Library", set a name and click ok.
Close the dialog, save the file, and reopen the animation libraries.
Notice that now the "Global" animation library is set as "[built-in]". (The animation has been integrated into the model.tscn file and the link to the glb is lost).
Okay, so I've been looking into this. Basically, it's primarily caused by a major limitation Godot has when it come to referencing external resources: although most of the functionality is technically there, Godot does not currently have a means of serializing an external resource which references a resource inside another resource. When you import a scene in Godot, the default behaviour is that if it has any animations, it is imported with an AnimationLibrary. This AnimationLibrary becomes a subresource of the imported scene meaning it can't be directly edited which is what is considered a 'foreign' resource.
The main problem is despite Godot technically being able to reference these foreign resources, there is no capability for it to serialize these references. Since the AnimationMixer's 'libraries' parameter is a dictionary, any changes to this which deviate from the default will result in any foreign libraries being converted into local ones, breaking the reference. As far as I can tell, the only real proper way to fix this is to introduce the capacity for external resources to reference foreign resources so that any changes to the libraries parameter will still point to the original resource.
Meanwhile, any workarounds? Should we just dump imported animations to files and manually create a library for them? Or make the animations as libraries and import them separately?
I will also add that in my case, trying to reimport and save the scene causes the editor to crash. Trying to remove all animation libraries beforehand doesn't help. I can live with importing animations manually, but the inability to reimport the scene itself is a problem.
Godot version
4.0.stable
System information
Windows 10
Issue description
Issue:
When adding a new animation library, the existing animation library imported from the .glb file is automatically changed from foreign to built-in upon saving, without any prompt or understandable reason. I believe this is a bug.
This results in losing the link between the .glb and the .tscn, now if animations are changed in the .glb they won't be updated in the .tscn.
Expected behaviour:
When adding a new animation library, the existing animation library imported from the .glb file does not change its type (if not possible, at least the animation(s) should not change its type).
Steps to reproduce
Using the project attached, do the following:
Minimal reproduction project
AnimationLibraryBug.zip
The text was updated successfully, but these errors were encountered: