And when I try to create a custom property named Tags, Blender automatically replaces this property with Baylon tags. The cursor moves itself to the BabylonJS section.
Here are the export settings, if it helps in any way:
The glTF scene structure is not a 1-to-1 mapping to Babylon scene structure. There is not a perfect place to store glTF extras for a glTF mesh because there is no equivalent object that represents a glTF mesh in Babylon.
If you can provide a playground of what you have so far with the custom loader extension, I can help you modify the code to make it work.
@bghgary This topic became interesting for us as well, as we got a request to import tags from Blender from our customer.
You mentioned the issue of the 1-to-1 mapping between Babylon and glTF meshes, which I understand to a certain extend, whereas I would say that a glTF node is quite close to a Babylon mesh, isn’t it?
I found the ExtrasAsMetadata glTF plugin, which IMO adresses the same topic as well.
=> extras are extracted from glTF node and added as metadata to a Babylon mesh.
So couldn’t we just do the same with tags?
=> extract extras.tags from glTF node and add as tags to Babylon mesh.
I’d be willing to contribute this code by myself.
Just let me know if this concept would work or if I am missing something here.
Sort of. I think I explained this in other threads already but let me know if something is not clear.
Maybe. It’s tricky because tags are not a concept in glTF. Anything in extras are considered application specific and is generic. Are tags something specific in Blender or is someone just putting this as a property that gets exported as extras? I think if we want this to be consistent and generic, it needs to be in a custom glTF extension. Barring that, it should just be a specific glTF loader extension customized to the specific scenario.