mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +00:00
streamline shape asset
shape asset now has the same import "@" as image asset cut out extra filename parameters that arent needed refresh hopefully fixed
This commit is contained in:
parent
542563feaf
commit
fd7342668c
15 changed files with 185 additions and 465 deletions
|
|
@ -993,6 +993,23 @@ TSShape* assimpLoadShape(const Torque::Path &path)
|
|||
tss->write(&dtsStream);
|
||||
}
|
||||
|
||||
Torque::Path dsqPath(cachedPath);
|
||||
dsqPath.setExtension("dsq");
|
||||
FileStream animOutStream;
|
||||
for (S32 i = 0; i < tss->sequences.size(); i++)
|
||||
{
|
||||
const String& seqName = tss->getName(tss->sequences[i].nameIndex);
|
||||
Con::printf("Writing DSQ Animation File for sequence '%s'", seqName.c_str());
|
||||
|
||||
dsqPath.setFileName(cachedPath.getFileName() + "_" + seqName);
|
||||
if (animOutStream.open(dsqPath.getFullPath(), Torque::FS::File::Write))
|
||||
{
|
||||
tss->exportSequence(&animOutStream, tss->sequences[i], false);
|
||||
animOutStream.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
loader.updateMaterialsScript(path);
|
||||
}
|
||||
loader.releaseImport();
|
||||
|
|
|
|||
|
|
@ -737,6 +737,23 @@ TSShape* loadColladaShape(const Torque::Path &path)
|
|||
tss->write(&dtsStream);
|
||||
}
|
||||
|
||||
Torque::Path dsqPath(cachedPath);
|
||||
dsqPath.setExtension("dsq");
|
||||
FileStream animOutStream;
|
||||
for (S32 i = 0; i < tss->sequences.size(); i++)
|
||||
{
|
||||
const String& seqName = tss->getName(tss->sequences[i].nameIndex);
|
||||
Con::printf("Writing DSQ Animation File for sequence '%s'", seqName.c_str());
|
||||
|
||||
dsqPath.setFileName(cachedPath.getFileName() + "_" + seqName);
|
||||
if (animOutStream.open(dsqPath.getFullPath(), Torque::FS::File::Write))
|
||||
{
|
||||
tss->exportSequence(&animOutStream, tss->sequences[i], false);
|
||||
animOutStream.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // DAE2DTS_TOOL
|
||||
|
||||
// Add collada materials to materials.tscript
|
||||
|
|
|
|||
|
|
@ -2138,7 +2138,7 @@ DefineTSShapeConstructorMethod(addSequence, bool,
|
|||
if (assetType == StringTable->insert("ShapeAsset"))
|
||||
{
|
||||
ShapeAsset* asset = AssetDatabase.acquireAsset<ShapeAsset>(assetId);
|
||||
srcPath = asset->getShapeFilePath();
|
||||
srcPath = asset->getShapeFile();
|
||||
AssetDatabase.releaseAsset(assetId);
|
||||
}
|
||||
else if (assetType == StringTable->insert("ShapeAnimationAsset"))
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ public:
|
|||
StringTableEntry getShapePath() const
|
||||
{
|
||||
if (mShapeAsset.notNull())
|
||||
return mShapeAsset->getShapeFilePath();
|
||||
return mShapeAsset->getShapeFile();
|
||||
else
|
||||
return StringTable->EmptyString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue