diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-06 12:55:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-06 12:55:45 +0100 |
commit | b30e6496bdc640422b5d708f27acb860a927425f (patch) | |
tree | d1eba0971b63f8f8e39e6f2752fc8d9944960318 /thirdparty/assimp/code/Common/BaseImporter.cpp | |
parent | 245c99175c242bdc60a212cc84986b1a9ad5aa08 (diff) | |
parent | 5fb160c7c692c469488f11aca90a36ac3248dfee (diff) |
Merge pull request #33347 from RevoluPowered/demo/assimp-importer-fbx
FBX Skinning and batch of fixes
Diffstat (limited to 'thirdparty/assimp/code/Common/BaseImporter.cpp')
-rw-r--r-- | thirdparty/assimp/code/Common/BaseImporter.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/thirdparty/assimp/code/Common/BaseImporter.cpp b/thirdparty/assimp/code/Common/BaseImporter.cpp index de5018a250..5c1e605549 100644 --- a/thirdparty/assimp/code/Common/BaseImporter.cpp +++ b/thirdparty/assimp/code/Common/BaseImporter.cpp @@ -67,7 +67,20 @@ using namespace Assimp; // Constructor to be privately used by Importer BaseImporter::BaseImporter() AI_NO_EXCEPT : m_progress() { - // nothing to do here + /** + * Assimp Importer + * unit conversions available + * if you need another measurment unit add it below. + * it's currently defined in assimp that we prefer meters. + * + * NOTE: Initialised here rather than in the header file + * to workaround a VS2013 bug with brace initialisers + * */ + importerUnits[ImporterUnits::M] = 1.0; + importerUnits[ImporterUnits::CM] = 0.01; + importerUnits[ImporterUnits::MM] = 0.001; + importerUnits[ImporterUnits::INCHES] = 0.0254; + importerUnits[ImporterUnits::FEET] = 0.3048; } // ------------------------------------------------------------------------------------------------ @@ -85,7 +98,7 @@ void BaseImporter::UpdateImporterScale( Importer* pImp ) double activeScale = importerScale * fileScale; // Set active scaling - pImp->SetPropertyFloat( AI_CONFIG_APP_SCALE_KEY, activeScale); + pImp->SetPropertyFloat( AI_CONFIG_APP_SCALE_KEY, static_cast<float>( activeScale) ); ASSIMP_LOG_DEBUG_F("UpdateImporterScale scale set: %f", activeScale ); } |