-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a new Animation Library changes existing Library from Foreign to Built-In #74766
Comments
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. |
just to say that I stumbled on the same issue today. |
Still present in 4.2.2 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: