mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-04 13:00:33 +00:00
Assimp checks against lowercase extensions, so we force the extension of the file to lower before fetching the importer.
Also adds sanity check that the importer was actually found before we try and use it.
This commit is contained in:
parent
75adcb9b7c
commit
04b0883a31
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue