mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 20:40:35 +00:00
reinforce dsq or dts filter
This commit is contained in:
parent
a8d370038a
commit
f5875dd5a2
2 changed files with 24 additions and 20 deletions
|
|
@ -985,14 +985,6 @@ TSShape* assimpLoadShape(const Torque::Path &path)
|
|||
TSShapeLoader::updateProgress(TSShapeLoader::Load_Complete, "Import complete");
|
||||
Con::printf("[ASSIMP] Shape created successfully.");
|
||||
|
||||
// Cache the model to a DTS file for faster loading next time.
|
||||
FileStream dtsStream;
|
||||
if (dtsStream.open(cachedPath.getFullPath(), Torque::FS::File::Write))
|
||||
{
|
||||
Con::printf("Writing cached shape to %s", cachedPath.getFullPath().c_str());
|
||||
tss->write(&dtsStream);
|
||||
}
|
||||
|
||||
if (tss->meshes.empty())
|
||||
{
|
||||
Torque::Path dsqPath(cachedPath);
|
||||
|
|
@ -1012,6 +1004,16 @@ TSShape* assimpLoadShape(const Torque::Path &path)
|
|||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cache the model to a DTS file for faster loading next time.
|
||||
FileStream dtsStream;
|
||||
if (dtsStream.open(cachedPath.getFullPath(), Torque::FS::File::Write))
|
||||
{
|
||||
Con::printf("Writing cached shape to %s", cachedPath.getFullPath().c_str());
|
||||
tss->write(&dtsStream);
|
||||
}
|
||||
}
|
||||
|
||||
loader.updateMaterialsScript(path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue