reinforce dsq or dts filter

This commit is contained in:
AzaezelX 2025-09-23 08:51:24 -05:00
parent a8d370038a
commit f5875dd5a2
2 changed files with 24 additions and 20 deletions

View file

@ -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);
}