mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-08 21:24:34 +00:00
few fixes
Only export DSQ if we have a realmesh to pair with it. When looking for the companion shape use the last '_' to strip instead of the first
This commit is contained in:
parent
2895e98cbb
commit
ec2a55c535
4 changed files with 113 additions and 7 deletions
|
|
@ -700,7 +700,21 @@ static bool sReadCollada(const Torque::Path& path, TSShape*& res_shape)
|
|||
if (tss)
|
||||
{
|
||||
TSShapeLoader::updateProgress(TSShapeLoader::Load_Complete, "Import complete");
|
||||
Con::printf("[COLLADA] Shape created successfully.");
|
||||
|
||||
bool realMesh = false;
|
||||
for (U32 i = 0; i < tss->meshes.size(); ++i)
|
||||
{
|
||||
if (tss->meshes[i] && tss->meshes[i]->getMeshType() != TSMesh::NullMeshType)
|
||||
{
|
||||
realMesh = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(realMesh)
|
||||
Con::printf("[COLLADA] Shape created successfully.");
|
||||
else
|
||||
Con::printf("[COLLADA] Animation created successfully.");
|
||||
|
||||
Torque::Path cachedPath(path);
|
||||
// Cache the model to a DTS file for faster loading next time.
|
||||
|
|
@ -716,7 +730,7 @@ static bool sReadCollada(const Torque::Path& path, TSShape*& res_shape)
|
|||
// Add collada materials to materials.tscript
|
||||
updateMaterialsScript(path, isSketchup);
|
||||
|
||||
if (tss->sequences.size() > 0)
|
||||
if (tss->sequences.size() > 0 && realMesh)
|
||||
{
|
||||
Torque::Path dsqPath(cachedPath);
|
||||
dsqPath.setExtension("dsq");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue