Update assimpShapeLoader.cpp

because of the convert to lefthand gltf all formats are good with Y_UP
This commit is contained in:
marauder2k7 2024-12-10 18:41:14 +00:00
parent 5beef47b23
commit af6722f547

View file

@ -235,11 +235,6 @@ void AssimpShapeLoader::enumerateScene()
// Format-specific adjustments // Format-specific adjustments
String fileExt = String::ToLower(shapePath.getExtension()); String fileExt = String::ToLower(shapePath.getExtension());
const aiImporterDesc* importerDescription = aiGetImporterDesc(fileExt.c_str()); const aiImporterDesc* importerDescription = aiGetImporterDesc(fileExt.c_str());
if (fileExt == String::ToString("gltf") || fileExt == String::ToString("glb")) {
Con::printf("[ASSIMP] Detected GLTF format, applying reorientation...");
ColladaUtils::getOptions().upAxis = UPAXISTYPE_X_UP;
}
if (importerDescription && dStrcmp(importerDescription->mName, "Autodesk FBX Importer") == 0) { if (importerDescription && dStrcmp(importerDescription->mName, "Autodesk FBX Importer") == 0) {
Con::printf("[ASSIMP] Detected FBX format, checking unit scale..."); Con::printf("[ASSIMP] Detected FBX format, checking unit scale...");
F32 scaleFactor = ColladaUtils::getOptions().unit; F32 scaleFactor = ColladaUtils::getOptions().unit;
@ -251,8 +246,6 @@ void AssimpShapeLoader::enumerateScene()
{ {
scaleScene(mScene, 0.01f); scaleScene(mScene, 0.01f);
} }
ColladaUtils::getOptions().upAxis = UPAXISTYPE_Y_UP;
} }
// Extract embedded textures // Extract embedded textures