Gltf export - missing scene metadata

I tried to export a gltf/glb model including scene metadata. The export works fine for meshes, but the scene metadata is missing in the exported gltf.

Any suggestion how to fix this?

Hello and welcome!

Seems like you need to assign metadata according to GLTF specs.

    cube.metadata = {"gltf":{"extras": {"someKey": "someValue"}}};

Example - https://playground.babylonjs.com/#67EZSP#2
Let me know if it works for your case.

cc @bghgary

Hi,
I was refering to the metadata of the scene object in line 7.

scene.metadata = {"someKey": "someValue"}

This data is missing in the scene object in the gltf file. The metadata of the cube is exported correctly.

1 Like

It looks like the exporter only handles node metadata. Feel free to contribute a fix or file a feature request on GitHub.

1 Like

Follow up is Export Scene metadata to GLTF - #2 by sebavan

1 Like