Hi,
I need to import a gltf file and access the metadata of the Scene object. For meshes it works fine, but for the Scene itself the metadata is not imported.
Any idea how to access the sene metadata (extras) of a imported gltf file?
Frank
Hi,
I need to import a gltf file and access the metadata of the Scene object. For meshes it works fine, but for the Scene itself the metadata is not imported.
Any idea how to access the sene metadata (extras) of a imported gltf file?
Frank
cc @bghgary, it seems we read extras for nodes, cameras and materials but not for the scene?
Yes, I think so
See here: Scene does not read metadata when loading from GLTF - Questions - Babylon.js (babylonjs.com)
I think we can try to do it and see if will cause issues. If someone loads multiple glTF objects into the same scene, maybe it will merge the metadata? Or we can store the glTF scene metadata on the root node.
For me the root node approach sounds better since it keeps the metadata of the gltf scene linked to the corresponding part of the babylon scene.
Another thing to consider is that we just merged support for exporting scene metadata which is based on the scene.metadata
. If we load the glTF scene metadata to the root node, it will not roundtrip.