closes https://github.com/assimp/assimp/issues/2054: make empty bone validation optional.

This commit is contained in:
Kim Kulling
2019-05-05 13:39:10 +02:00
parent 0b9c72fa94
commit fcff12b219
8 changed files with 52 additions and 50 deletions

View File

@@ -140,6 +140,7 @@ void FBXImporter::SetupProperties(const Importer* pImp)
settings.preservePivots = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS, true);
settings.optimizeEmptyAnimationCurves = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES, true);
settings.useLegacyEmbeddedTextureNaming = pImp->GetPropertyBool(AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING, false);
settings.removeEmptyBones = pImp->GetPropertyBool(AI_CONFIG_IMPORT_REMOVE_EMPTY_BONES, true);
}
// ------------------------------------------------------------------------------------------------
@@ -184,7 +185,7 @@ void FBXImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
Document doc(parser,settings);
// convert the FBX DOM to aiScene
ConvertToAssimpScene(pScene,doc);
ConvertToAssimpScene(pScene,doc, settings.removeEmptyBones);
std::for_each(tokens.begin(),tokens.end(),Util::delete_fun<Token>());
}