Import settings persistence

Adds new settings to ColladaUtils::ImportSettings and TSShapeConstructor::ImportSettings for persistence. Shape will now be re-imported with the original settings if the source art is newer or the cached.dts file has been deleted.
Fixes material transparency blend mode assignment.
Adds implementation for override scale, material prefix and always/never import options.
Reads and applies metadata fields for scale and up axis from formats that provide it.
Eliminates the assimp.log file and redirects log messages to console.log. Verbose logging is enabled in debug builds.
This commit is contained in:
OTHGMars 2019-05-21 01:18:27 -04:00
parent d0ca41e103
commit 27c5412768
10 changed files with 575 additions and 141 deletions

View file

@ -58,8 +58,8 @@ AssimpAppSequence::AssimpAppSequence(aiAnimation *a) :
}
}
S32 timeFactor = Con::getIntVariable("$Assimp::AnimTiming", 1);
S32 fpsRequest = Con::getIntVariable("$Assimp::AnimFPS", 30);
S32 timeFactor = ColladaUtils::getOptions().animTiming;
S32 fpsRequest = ColladaUtils::getOptions().animFPS;
if (timeFactor == 0)
{ // Timing specified in frames
fps = mClamp(fpsRequest, 5 /*TSShapeLoader::MinFrameRate*/, TSShapeLoader::MaxFrameRate);
@ -70,10 +70,7 @@ AssimpAppSequence::AssimpAppSequence(aiAnimation *a) :
else
{ // Timing specified in seconds or ms depending on format
if (maxEndTime > 1000.0f || mAnim->mDuration > 1000.0f)
{
timeFactor = 1000.0f; // If it's more than 1000 seconds, assume it's ms.
Con::setIntVariable("$Assimp::AnimTiming", 1000);
}
timeFactor = mClamp(timeFactor, 1, 1000);
minFrameTime /= (F32)timeFactor;