mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
more fixes
DSQ Fixes
This commit is contained in:
parent
2606b6366b
commit
10acab1b07
3 changed files with 11 additions and 6 deletions
|
|
@ -2097,7 +2097,7 @@ void AssetImporter::processShapeAnimationAsset(AssetImportObject* assetItem)
|
||||||
{
|
{
|
||||||
enumColladaForImport(filePath, shapeInfo, false);
|
enumColladaForImport(filePath, shapeInfo, false);
|
||||||
}
|
}
|
||||||
else if (fileExt.compare("dts") == 0 || fileExt.compare("dsq") == 0)
|
else if (fileExt.compare("dts") == 0)
|
||||||
{
|
{
|
||||||
enumDTSForImport(filePath, shapeInfo);
|
enumDTSForImport(filePath, shapeInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -968,7 +968,14 @@ TSShape* assimpLoadShape(const Torque::Path &path)
|
||||||
TSShapeLoader::updateProgress(TSShapeLoader::Load_Complete, "Import complete");
|
TSShapeLoader::updateProgress(TSShapeLoader::Load_Complete, "Import complete");
|
||||||
Con::printf("[ASSIMP] Shape created successfully.");
|
Con::printf("[ASSIMP] Shape created successfully.");
|
||||||
|
|
||||||
if (tss->meshes.empty())
|
bool realMesh = false;
|
||||||
|
for (U32 i = 0; i < tss->meshes.size(); ++i)
|
||||||
|
{
|
||||||
|
if (tss->meshes[i] && tss->meshes[i]->getMeshType() != TSMesh::NullMeshType)
|
||||||
|
realMesh = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!realMesh)
|
||||||
{
|
{
|
||||||
Torque::Path dsqPath(cachedPath);
|
Torque::Path dsqPath(cachedPath);
|
||||||
dsqPath.setExtension("dsq");
|
dsqPath.setExtension("dsq");
|
||||||
|
|
|
||||||
|
|
@ -2155,15 +2155,13 @@ DefineTSShapeConstructorMethod(addSequence, bool,
|
||||||
StringTableEntry assetType = AssetDatabase.getAssetType(assetId);
|
StringTableEntry assetType = AssetDatabase.getAssetType(assetId);
|
||||||
if (assetType == StringTable->insert("ShapeAsset"))
|
if (assetType == StringTable->insert("ShapeAsset"))
|
||||||
{
|
{
|
||||||
ShapeAsset* asset = AssetDatabase.acquireAsset<ShapeAsset>(assetId);
|
AssetPtr<ShapeAsset> asset = assetId;
|
||||||
srcPath = asset->getShapeFile();
|
srcPath = asset->getShapeFile();
|
||||||
AssetDatabase.releaseAsset(assetId);
|
|
||||||
}
|
}
|
||||||
else if (assetType == StringTable->insert("ShapeAnimationAsset"))
|
else if (assetType == StringTable->insert("ShapeAnimationAsset"))
|
||||||
{
|
{
|
||||||
ShapeAnimationAsset* asset = AssetDatabase.acquireAsset<ShapeAnimationAsset>(assetId);
|
AssetPtr<ShapeAnimationAsset> asset = assetId;
|
||||||
srcPath = asset->getAnimationPath();
|
srcPath = asset->getAnimationPath();
|
||||||
AssetDatabase.releaseAsset(assetId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue