mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Merge branch 'development' into style-cleanup
Conflicts: Engine/source/console/astNodes.cpp Engine/source/console/codeBlock.cpp Engine/source/console/compiledEval.cpp Engine/source/ts/collada/colladaAppMesh.cpp Engine/source/ts/tsShape.cpp Engine/source/ts/tsShapeConstruct.cpp
This commit is contained in:
commit
33ff180593
2053 changed files with 172002 additions and 69530 deletions
|
|
@ -21,6 +21,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "platform/platform.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "ts/loader/tsShapeLoader.h"
|
||||
|
||||
#include "core/volume.h"
|
||||
|
|
@ -30,6 +31,14 @@
|
|||
#include "ts/tsShapeInstance.h"
|
||||
#include "ts/tsMaterialList.h"
|
||||
|
||||
MODULE_BEGIN( ShapeLoader )
|
||||
MODULE_INIT_AFTER( GFX )
|
||||
MODULE_INIT
|
||||
{
|
||||
TSShapeLoader::addFormat("Torque DTS", "dts");
|
||||
TSShapeLoader::addFormat("Torque DSQ", "dsq");
|
||||
}
|
||||
MODULE_END;
|
||||
|
||||
const F32 TSShapeLoader::smDefaultTime = -1.0f;
|
||||
const F64 TSShapeLoader::smMinFrameRate = 15.0f;
|
||||
|
|
@ -37,6 +46,8 @@ const F64 TSShapeLoader::smMaxFrameRate = 60.0f;
|
|||
const F64 TSShapeLoader::smAppGroundFrameRate = 10.0f;
|
||||
Torque::Path TSShapeLoader::smShapePath;
|
||||
|
||||
Vector<TSShapeLoader::ShapeFormat> TSShapeLoader::smFormats;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Utility functions
|
||||
|
||||
|
|
@ -1270,3 +1281,53 @@ TSShapeLoader::~TSShapeLoader()
|
|||
delete mAppSequences[iSeq];
|
||||
mAppSequences.clear();
|
||||
}
|
||||
|
||||
// Static functions to handle supported formats for shape loader.
|
||||
void TSShapeLoader::addFormat(String name, String extension)
|
||||
{
|
||||
ShapeFormat newFormat;
|
||||
newFormat.mName = name;
|
||||
newFormat.mExtension = extension;
|
||||
smFormats.push_back(newFormat);
|
||||
}
|
||||
|
||||
String TSShapeLoader::getFormatExtensions()
|
||||
{
|
||||
// "*.dsq TAB *.dae TAB
|
||||
StringBuilder output;
|
||||
for(U32 n = 0; n < smFormats.size(); ++n)
|
||||
{
|
||||
output.append("*.");
|
||||
output.append(smFormats[n].mExtension);
|
||||
output.append("\t");
|
||||
}
|
||||
return output.end();
|
||||
}
|
||||
|
||||
String TSShapeLoader::getFormatFilters()
|
||||
{
|
||||
// "DSQ Files|*.dsq|COLLADA Files|*.dae|"
|
||||
StringBuilder output;
|
||||
for(U32 n = 0; n < smFormats.size(); ++n)
|
||||
{
|
||||
output.append(smFormats[n].mName);
|
||||
output.append("|*.");
|
||||
output.append(smFormats[n].mExtension);
|
||||
output.append("|");
|
||||
}
|
||||
return output.end();
|
||||
}
|
||||
|
||||
DefineConsoleFunction( getFormatExtensions, const char*, ( ),,
|
||||
"Returns a list of supported shape format extensions separated by tabs."
|
||||
"Example output: *.dsq TAB *.dae TAB")
|
||||
{
|
||||
return Con::getReturnBuffer(TSShapeLoader::getFormatExtensions());
|
||||
}
|
||||
|
||||
DefineConsoleFunction( getFormatFilters, const char*, ( ),,
|
||||
"Returns a list of supported shape formats in filter form.\n"
|
||||
"Example output: DSQ Files|*.dsq|COLLADA Files|*.dae|")
|
||||
{
|
||||
return Con::getReturnBuffer(TSShapeLoader::getFormatFilters());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue