FIX missing update call for scale to post process

This commit is contained in:
Gordon MacPherson
2019-08-27 15:50:50 +01:00
parent 234b759cbc
commit abdd853ca5
3 changed files with 38 additions and 14 deletions
+7 -3
View File
@@ -192,9 +192,13 @@ void FBXImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
// convert the FBX DOM to aiScene
ConvertToAssimpScene(pScene, doc, settings.removeEmptyBones, unit);
// units is relative to CM :) we need it in meters for assimp
SetFileScale( doc.GlobalSettings().UnitScaleFactor() * 0.01f);
// size relative to cm
float size_relative_to_cm = doc.GlobalSettings().UnitScaleFactor();
// Set FBX file scale is relative to CM must be converted to M for
// assimp universal format (M)
SetFileScale( size_relative_to_cm * 0.01f);
std::for_each(tokens.begin(),tokens.end(),Util::delete_fun<Token>());
}