Hi, is there a way to add custom property to glb model in blender and import it to babylonjs ?
Example: I want to be able to specify objects that will have shadows, would be nice to add property withShadow: true
in blender and import object with this property to babylonjs
Click mesh, then use Custom Properties tab in Blender.
When exporting GLB make sure you check Custom Properties checkbox.
Thank you as always !
Faced with issue when some meshes doesn’t load extra properties, properties are definitely there because when imported into blender they are saved.
GLB example:
frame.zip (5.6 MB)
I believe this is because of how the model is done in Blender.
It has 1 mesh and 2 materials there.
In GLB it has the Transform node with your extras and 2 mesh primitives without any extras.
You may try to make separate 2 meshes in Blender and assign the relevant material and extras to those meshes.
Yes, you are right, merged meshes lose properties
Hello everyone, do you have a working code for import glb with custom properties please ?
Did you try the techniques outlined in this thread?
Hello and welcome!
Example of GetExtrasAsMetadata class - https://playground.babylonjs.com/#IZBAT2#0
Hello, thank you for your answers. Finally I tripped over the carpet. I was not loading the right object and indeed the metadata is present in my mesh without using “plugin.onParsedObservable”.
Very good day to you.