-
I'm working with a bunch a 3D models in GLTG/GLB format. Each of these models has several parts. When the viewer is initializing i retrieve each parts to build a couple of buttons associated with each (show / hide). Since there is sometimes lots of parts i'm displaying the part name along-side those buttons for the user to know which part he can hide / display The thing is i'm not retrieving the name i thought i'd get. Considering the image within this message, i thought i'd get the "main node" name (jaw_down). Instead i'm getting the last child, of the said node, name (the name of the material). More than juste information, i'm asking because if we can anticipate the naming for futur models, we're going to have lots of work for the already made ones. If there is no way to retrieve this name it's an hassle but not the end of the world ;) The way i retrieve the parts (maybe it's there i'm not doing things right)
I tried ton console.log the parts to check the data they got, but this "true"name is nowhere to be found Thanks for any help. Sorry is this issue is deemed useless ^^' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
yes, the materials are indeed the glTF materials, which are not parts/meshes/primitives. Our API intentionally mirrors glTF (which doesn't have anything called a part). We also intentionally don't expose the glTF meshes/primitives in our API for simplicity. So yes, you'll need to make sure the materials themselves are named in the glTF file, which might require looking at the exporter. You might find it helpful to open your file in our editor; the last tab is the glTF JSON, where you can directly find the names and such. |
Beta Was this translation helpful? Give feedback.
yes, the materials are indeed the glTF materials, which are not parts/meshes/primitives. Our API intentionally mirrors glTF (which doesn't have anything called a part). We also intentionally don't expose the glTF meshes/primitives in our API for simplicity. So yes, you'll need to make sure the materials themselves are named in the glTF file, which might require looking at the exporter. You might find it helpful to open your file in our editor; the last tab is the glTF JSON, where you can directly find the names and such.