Open robertdhernandez opened 7 months ago
creating scene chunks (nodes in tree arrangement) outside the active tree is fine
This is exactly what the code is written to do: The vrm loading code does not interact with the scene tree.
I tried on Godot 4.3 stable and I do not see the error.
Is it possible that the version of 4.2 you tried had a bug? I'd like to know if you can still reproduce this problem.
The warnings in the sample project appear when running Godot 4.2.2-stable but does not appear when running in Godot 4.3-stable.
To avoid stalling the main thread, I am loading VRM models at run-time in a background thread. The official Godot documentation specifies in the thread-safe API:
I have gotten background loading to work, however some models throw an error when loading:
There are some points in
vrm_utils.gd
that modify the scene tree, causing this error to be thrown. I have not delved deep enough to see what impacts it may have (i.e., if it is ignorable), however it is a cause for concern.I have attached an example Godot 4.2 project that demonstrates the error using the sample VRM models provided by the repository. The project will accept models drag and dropped and load multiple models sequentially in a background thread. On start-up, it will load both Alicia and Godette. The active model can be swapped with the left and right arrow keys.
vrm-model-viewer.zip