Check if the model is empty based on the node hierarchy.
This commit is contained in:
parent
fc2dd12aa0
commit
94e8f15a24
@ -47,13 +47,13 @@ OV.FlipMeshTrianglesOrientation = function (mesh)
|
|||||||
|
|
||||||
OV.IsModelEmpty = function (model)
|
OV.IsModelEmpty = function (model)
|
||||||
{
|
{
|
||||||
for (let i = 0; i < model.MeshCount (); i++) {
|
let isEmpty = true;
|
||||||
let mesh = model.GetMesh (i);
|
model.EnumerateMeshInstances ((meshInstance) => {
|
||||||
if (mesh.TriangleCount () > 0) {
|
if (meshInstance.TriangleCount () > 0) {
|
||||||
return false;
|
isEmpty = false;
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
return true;
|
return isEmpty;
|
||||||
};
|
};
|
||||||
|
|
||||||
OV.CloneMesh = function (mesh)
|
OV.CloneMesh = function (mesh)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user