Access gltf/glb custom properties

Blender can export custom properties into a gltf/glb file. Is there any way to acess these in babylon?
Mesh.metadata doesn’t contain them.

Let me invoke our Blender Grandmaster @JCPalmer

Maybe @Vinc3r knows, but not actually a BJS question until they are actually in the file.

First, does gltf even have custom property / metadata storage?

If yes, then does the Blender implement it? For that I would go to the Blender / Khronos repo

If yes, ask if / how it is implemented in the loader.

@JCPalmer Blender does support this., the Khronos exporter as well.
(Added support to export custom properties/extras. · KhronosGroup/glTF-Blender-Exporter@0835c60 · GitHub)

Would you be open to a pr for this if it is not implemented in the loader yet?

This would be very handy for e.g. storing information about collision shapes (whether its a box, sphere, etc) or physics data like the mass of an object.

I did not write the glft loader in BJS. Think @Deltakosh flagged me because of Blender, back to him.

@mauricedoepke, I would create a simple plane, add a value like ‘I AM ALIVE’ for the custom property, then export in the text format.

You could then post the tiny file here, and ask why not , or where this is in the loaded scene.

1 Like

Pinging @bghgary but I do think we expose it

3dsmax export to .gltf with tags links to a PG that adds a custom loader extension to read extras properties. You can do something similar for whatever extras you are exporting.

1 Like

Thanks, thats exactly what i needed.