Open Lamoot opened 2 weeks ago
Yep, unfortunately that is expected. The scene that contains the imported node must be open during the import process. I have spent time in the past trying to resolve this and couldn't (reason given below).
This was behaviour I did not see in Godot 4.2.1 stable, so somewhere between there are 4.3, the import pipeline has changed, and if there are nodes which are linked to a GLTF file, then the scene that node is in should be open when the post import script is triggered (either manually via re-importing or by exporting a .gltf file).
There might be a solution if this addon were a Godot plugin proper, because then we would have some ability to check which scene is open in the editor. Since this is just a GDscript attached to a Node3D, I don't believe there is a way to determine which scene is open. @tool scripts also would not have that level of access.
I won't close the issue in case anyone else has any ideas.
The issue isn't such a problem when the user knows what is causing it. It's a then a simple matter of focusing the correct scene and re-exporting the gltf.
A lot of it would be mitigated if there were a way to detect the error from Godot's side before outputting the long list of red errors. In this case the process would be aborted and a helpful hint provided.
The following screenshot shows an error I get when I re-export the .gltf file from Blender and the Godot addon tries to update the related nodes in their scene but can't find them.
Ideally the addon in Godot would handle such cases and update the relevant scene. However it's likely tricky to get that working so at least a more graceful and informative fail would be enough.