Merge branch 'AssimpWIP' of https://github.com/Areloch/Torque3D into development

This commit is contained in:
Areloch 2019-05-04 16:25:16 -05:00
commit 951594259f
909 changed files with 367086 additions and 2721 deletions

View file

@ -1325,6 +1325,17 @@ String TSShapeLoader::getFormatFilters()
return output.end();
}
bool TSShapeLoader::isSupportedFormat(String extension)
{
String extLower = String::ToLower(extension);
for (U32 n = 0; n < smFormats.size(); ++n)
{
if (smFormats[n].mExtension.equal(extLower))
return true;
}
return false;
}
DefineEngineFunction( getFormatExtensions, const char*, ( ),,
"Returns a list of supported shape format extensions separated by tabs."
"Example output: *.dsq TAB *.dae TAB")
@ -1338,3 +1349,8 @@ DefineEngineFunction( getFormatFilters, const char*, ( ),,
{
return Con::getReturnBuffer(TSShapeLoader::getFormatFilters());
}
DefineEngineFunction(isSupportedFormat, bool, (const char* extension), , "")
{
return TSShapeLoader::isSupportedFormat(extension);
}