Merge pull request #677 from Areloch/assimpExtensionCaseFix

Fix extension case handling when looking up assimp importer
This commit is contained in:
Brian Roberts 2021-11-20 00:38:03 -06:00 committed by GitHub
commit 05a8a014b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,8 +178,9 @@ void AssimpShapeLoader::enumerateScene()
// Setup default units for shape format
String importFormat;
const aiImporterDesc* importerDescription = aiGetImporterDesc(shapePath.getExtension().c_str());
if (StringTable->insert(importerDescription->mName) == StringTable->insert("Autodesk FBX Importer"))
String fileExt = String::ToLower(shapePath.getExtension());
const aiImporterDesc* importerDescription = aiGetImporterDesc(fileExt.c_str());
if (importerDescription && StringTable->insert(importerDescription->mName) == StringTable->insert("Autodesk FBX Importer"))
{
ColladaUtils::getOptions().formatScaleFactor = 0.01f;
}