mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Merge pull request #1549 from Azaezel/alpha41/filterForFBX
expand TSShape::addSequence filetype filtercheck
This commit is contained in:
commit
dae9642ef8
2 changed files with 21 additions and 2 deletions
|
|
@ -681,6 +681,7 @@ class TSShape
|
||||||
S32 setDetailSize(S32 oldSize, S32 newSize);
|
S32 setDetailSize(S32 oldSize, S32 newSize);
|
||||||
bool removeDetail(S32 size);
|
bool removeDetail(S32 size);
|
||||||
|
|
||||||
|
bool isShapeFileType(Torque::Path filePath);
|
||||||
bool addSequence(const Torque::Path& path, const String& fromSeq, const String& name, S32 startFrame, S32 endFrame, bool padRotKeys, bool padTransKeys);
|
bool addSequence(const Torque::Path& path, const String& fromSeq, const String& name, S32 startFrame, S32 endFrame, bool padRotKeys, bool padTransKeys);
|
||||||
bool removeSequence(const String& name);
|
bool removeSequence(const String& name);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1356,6 +1356,25 @@ bool TSShape::removeDetail( S32 size )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TSShape::isShapeFileType(Torque::Path filePath)
|
||||||
|
{
|
||||||
|
String fileExt = filePath.getExtension();
|
||||||
|
|
||||||
|
if (
|
||||||
|
fileExt.equal("dts", String::NoCase) ||
|
||||||
|
fileExt.equal("dsq", String::NoCase) ||
|
||||||
|
fileExt.equal("dae", String::NoCase) ||
|
||||||
|
fileExt.equal("fbx", String::NoCase) ||
|
||||||
|
fileExt.equal("blend", String::NoCase) ||
|
||||||
|
fileExt.equal("obj", String::NoCase) ||
|
||||||
|
fileExt.equal("gltf", String::NoCase) ||
|
||||||
|
fileExt.equal("glb", String::NoCase)
|
||||||
|
)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
|
bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
|
||||||
const String& name, S32 startFrame, S32 endFrame,
|
const String& name, S32 startFrame, S32 endFrame,
|
||||||
|
|
@ -1439,8 +1458,7 @@ bool TSShape::addSequence(const Torque::Path& path, const String& fromSeq,
|
||||||
Resource<TSShape> hSrcShape;
|
Resource<TSShape> hSrcShape;
|
||||||
TSShape* srcShape = this; // Assume we are copying an existing sequence
|
TSShape* srcShape = this; // Assume we are copying an existing sequence
|
||||||
|
|
||||||
if (path.getExtension().equal("dts", String::NoCase) ||
|
if (isShapeFileType(path))
|
||||||
path.getExtension().equal("dae", String::NoCase))
|
|
||||||
{
|
{
|
||||||
// DTS or DAE source file
|
// DTS or DAE source file
|
||||||
char filenameBuf[1024];
|
char filenameBuf[1024];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue