Fix three.js import when a mesh node has children.

This commit is contained in:
kovacsv 2021-11-14 09:37:43 +01:00
parent 608d6b896d
commit d2039f97e6

View File

@ -139,7 +139,9 @@ OV.ImporterThreeBase = class extends OV.ImporterBase
AddObject (importer, model, childObject, node);
}
if (threeObject.isMesh && importer.IsMeshVisible (threeObject)) {
node.SetType (OV.NodeType.MeshNode);
if (threeObject.children.length === 0) {
node.SetType (OV.NodeType.MeshNode);
}
let mesh = importer.ConvertThreeMesh (threeObject);
let meshIndex = model.AddMesh (mesh);
node.AddMeshIndex (meshIndex);