diff --git a/build/FBX2glTF b/build/FBX2glTF index 271a681..57c5b7d 100755 Binary files a/build/FBX2glTF and b/build/FBX2glTF differ diff --git a/src/fbx/Fbx2Raw.cpp b/src/fbx/Fbx2Raw.cpp index f11438a..12c4151 100644 --- a/src/fbx/Fbx2Raw.cpp +++ b/src/fbx/Fbx2Raw.cpp @@ -1163,11 +1163,14 @@ bool LoadFBXFile( } // this is always 0.01, but let's opt for clarity. scaleFactor = FbxSystemUnit::m.GetConversionFactorFrom(FbxSystemUnit::cm); -FbxNode* rootNode = pScene->GetRootNode(); - ReadNodeHierarchy(raw, pScene, rootNode->GetChild(0), 0, ""); - ReadNodeAttributes(raw, pScene, rootNode->GetChild(0), textureLocations); - // ReadNodeHierarchy(raw, pScene, pScene->GetRootNode(), 0, ""); - // ReadNodeAttributes(raw, pScene, pScene->GetRootNode(), textureLocations); + FbxNode* rootNode = pScene->GetRootNode(); + if (rootNode->GetChildCount() > 1) { + ReadNodeHierarchy(raw, pScene, rootNode, 0, ""); + ReadNodeAttributes(raw, pScene, rootNode, textureLocations); + } else { + ReadNodeHierarchy(raw, pScene, rootNode->GetChild(0), 0, ""); + ReadNodeAttributes(raw, pScene, rootNode->GetChild(0), textureLocations); + } ReadAnimations(raw, pScene, options); pScene->Destroy();