How to register import ExtrasAsMetadata gltf extension


I try to use metadata stored to the extras object in my gltf file. Unfortunately the information is not in my mesh metadata but it is for sure in the gltf file.

I just use: import ‘@babylonjs/loaders/glTF/2.0/Extensions/ExtrasAsMetadata’

Do I have to do something else to use this extension? Draco compression works if I just import it.


Can you try to repro in the playground? The extension only gets metadata for nodes, cameras, and materials right now. Perhaps you want the extras for something not in that list?

Thanks for your reply.

I see, that is definitely part of the problem. I would like to get custom properties from skeletons/armatures as well. Can you disclose how to add this functionality?

In addition to that I realized that the custom properties have to be stated at the “Object Properties” panel and not at the “Object Data Properties” panel. So now I am able to get the custom data from my meshes.

I think you’re asking how to add the code? The first step is to make a skeleton able to have metadata. Currently anything that derives from node can, but skeleton doesn’t derive from node. Then you basically do the same thing as node, camera, and material in the ExtrasAsMetadata code.

I don’t know what you mean by this. :expressionless: What’s the “Object Properties” / “Object Data Properties” panel?


Thanks. I will try to add metadata to skeletons.

Oh sorry :sweat_smile: That are panels in blender. I was confused because you have these two options to add metadata to meshes but object properties is the right one.

1 Like