There is a problem with the mesh name #84

This commit is contained in:
kovacsv 2021-06-16 21:55:17 +02:00
parent b9db7fd9e2
commit 3bbae2cf68

View File

@ -476,6 +476,7 @@ OV.ImporterGltf = class extends OV.ImporterBase
ProcessMainFile (gltf)
{
console.log (gltf);
let unsupportedExtensions = this.gltfExtensions.GetUnsupportedExtensions (gltf.extensionsRequired);
if (unsupportedExtensions.length > 0) {
this.SetError ();
@ -726,6 +727,8 @@ OV.ImporterGltf = class extends OV.ImporterBase
this.model.AddMesh (mesh);
if (gltfMesh.name !== undefined) {
mesh.SetName (gltfMesh.name);
} else if (gltfNode.name !== undefined) {
mesh.SetName (gltfNode.name);
}
for (let i = 0; i < gltfMesh.primitives.length; i++) {