Merge pull request #667 from Azaezel/alpha40/scaleShenanigans

fix fbx importer lookup for setting formatScaleFactor
This commit is contained in:
Brian Roberts 2021-11-11 18:33:11 -06:00 committed by GitHub
commit 91469c25ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,11 +177,11 @@ void AssimpShapeLoader::enumerateScene()
// Setup default units for shape format
String importFormat;
if (getMetaString("SourceAsset_Format", importFormat))
const aiImporterDesc* importerDescription = aiGetImporterDesc(shapePath.getExtension().c_str());
if (importerDescription->mName == "Autodesk FBX Importer")
{
// FBX uses cm as standard unit, so convert to meters
if (importFormat.equal("Autodesk FBX Importer", String::NoCase))
ColladaUtils::getOptions().formatScaleFactor = 0.01f;
ColladaUtils::getOptions().formatScaleFactor = 0.01f;
}
// Set import options (if they are not set to override)