One of the reasons I went with GLTF files is that blender will export models “linked” in. This is fantastic, because I can build a library of props and parts, and when I update one prop, it’ll update in all of the other files where it is linked. All I need to do is re-export to GLTF.
However, I’ve found that I get an error if I link the same blender file more than once:
Uncaught (in promise) Error: /nodes/8: Invalid recursive node hierarchy
at GLTFLoader.loadNodeAsync (glTF.js:3725)
at ExtrasAsMetadata.loadNodeAsync (glTF.js:7288)
at glTF.js:5149
at GLTFLoader._applyExtensions (glTF.js:5126)
at GLTFLoader._extensionsLoadNodeAsync (glTF.js:5149)
at GLTFLoader.loadNodeAsync (glTF.js:3720)
at loadNode (glTF.js:3742)
at GLTFLoader._loadMeshAsync (glTF.js:3809)
at GLTFLoader.loadNodeAsync (glTF.js:3758)
at ExtrasAsMetadata.loadNodeAsync (glTF.js:7288)
I can get around this by “appending” the blend files instead of linking them, but then I have to delete and re-append every time I update one of these props. Not ideal.
Does anyone have any pointers to get around this error? Can I plug into the GLTF loader and make a copy everywhere there’s a link?
An example GLB file is attached: example.zip (58.8 KB)
'cause I can’t reproduce the issue, here my tiny test file:
in master.blend (left on my screen), i’ve linked “suzanne” object from suzanne.blend (top right in my screen) (and also add a library override to move its position)
suzanne was then duplicate instanced
when I export to glb (default settings), I haven’t any errors in the BJS sandbox (while I have the Invalid recursive node hierarchy with your glb example file)
Compression seems to be a hit or miss sometimes. So that is on or off depending on if it’s going to crash blender or not.
My assumption was that the linking was what was creating the recursion, but maybe I’m looking in the wrong place. I’ll start over with a minimal setup, see if I can track down what’s causing the issue.
Thanks for your help in proving it should be possible.
(from your .glb example I just see we can’t import gltf file in Blender when Draco compression is used, hope this will be fixed soon [edit] just find a workaround about that)