feat: compatible multi rootNode in scene
This commit is contained in:
parent
826543d876
commit
f40e11f957
BIN
build/FBX2glTF
BIN
build/FBX2glTF
Binary file not shown.
|
@ -1163,11 +1163,14 @@ bool LoadFBXFile(
|
||||||
}
|
}
|
||||||
// this is always 0.01, but let's opt for clarity.
|
// this is always 0.01, but let's opt for clarity.
|
||||||
scaleFactor = FbxSystemUnit::m.GetConversionFactorFrom(FbxSystemUnit::cm);
|
scaleFactor = FbxSystemUnit::m.GetConversionFactorFrom(FbxSystemUnit::cm);
|
||||||
FbxNode* rootNode = pScene->GetRootNode();
|
FbxNode* rootNode = pScene->GetRootNode();
|
||||||
ReadNodeHierarchy(raw, pScene, rootNode->GetChild(0), 0, "");
|
if (rootNode->GetChildCount() > 1) {
|
||||||
ReadNodeAttributes(raw, pScene, rootNode->GetChild(0), textureLocations);
|
ReadNodeHierarchy(raw, pScene, rootNode, 0, "");
|
||||||
// ReadNodeHierarchy(raw, pScene, pScene->GetRootNode(), 0, "");
|
ReadNodeAttributes(raw, pScene, rootNode, textureLocations);
|
||||||
// ReadNodeAttributes(raw, pScene, pScene->GetRootNode(), textureLocations);
|
} else {
|
||||||
|
ReadNodeHierarchy(raw, pScene, rootNode->GetChild(0), 0, "");
|
||||||
|
ReadNodeAttributes(raw, pScene, rootNode->GetChild(0), textureLocations);
|
||||||
|
}
|
||||||
ReadAnimations(raw, pScene, options);
|
ReadAnimations(raw, pScene, options);
|
||||||
|
|
||||||
pScene->Destroy();
|
pScene->Destroy();
|
||||||
|
|
Loading…
Reference in New Issue