Loading .babylon scene as a child of a specific scene graph node

Thanks for explaining!

It would be great for that explanation to be in the API docs. That is completely not intuitive from the naming, and the type definitions. I would never assume (especially for a particular file type) that the root node is an empty mesh, and that it is specifically the first one in a list of meshes.

I get that maybe that’s there for backwards compatibility, but why wasn’t a better intuitive API added as an alternative, and possibly the old stuff deprecated? Keeping backwards compatibility is only part of the ideal picture. We need new features with new APIs that make sense, without backwards compat causing APIs to be very unintuitive.

I’m also not using exclusively GLTF, so what’s the answer for all other assets types?

Adding .rootNodes to ImportMeshes would seem to be intuitive: we’d know exactly where to get the root node(s) we from our imported model, but:

Well that makes no sense! So now there’s an API that gives me a result with rootNodes, but they aren’t the root node(s) of the thing I imported? :woozy_face:

The answer is still not clear (especially for non-GLTF models).

I’m hoping intuitive APIs can replace these old ones.

But same problem: that only works based on an undocumented quirk mentioned in this thread specifically for GLTF files.

How do we get the root node(s) of any type of model we import, without making a new scene, without adding the model to an existing scene? And then how do we properly create a parent node in a scene, and then properly parent the loaded model into that parent node?