Fix hierarchy detection.

This commit is contained in:
kovacsv 2023-05-08 19:21:17 +02:00
parent 10f97dcf84
commit 7a6cdaee68
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ export class NavigatorMeshesPanel extends NavigatorPanel
const rootNode = importResult.model.GetRootNode ();
let isHierarchical = false;
for (let childNode of rootNode.GetChildNodes ()) {
if (childNode.ChildNodeCount () > 0) {
if (childNode.ChildNodeCount () > 0 || childNode.MeshIndexCount () > 1) {
isHierarchical = true;
break;
}

View File

@ -17,7 +17,7 @@ export function GetNodeName (originalName)
export function GetMeshName (originalNodeName, originalMeshName)
{
let originalName = (originalMeshName.length > 0 ? originalMeshName : originalNodeName);
let originalName = (originalNodeName.length > 0 ? originalNodeName : originalMeshName);
return GetNameOrDefault (originalName, 'No Name');
}