Fixes mapping of imposter images to be packed as part of the shape asset, and fixes paths to be formatted more sanely.

This commit is contained in:
JeffR 2021-12-10 00:01:26 -06:00
parent bd876e427a
commit a8b3d874a1
7 changed files with 186 additions and 7 deletions

View file

@ -3062,6 +3062,15 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
}
}
if (Con::getBoolVariable("$TSLastDetail::dumpImposters", false))
{
String imposterPath = assetItem->assetName + "_imposter.png";
String normalsPath = assetItem->assetName + "_imposter_normals.png";
newAsset->setDiffuseImposterFile(imposterPath.c_str());
newAsset->setNormalImposterFile(normalsPath.c_str());
}
Taml tamlWriter;
bool importSuccessful = tamlWriter.write(newAsset, tamlPath.c_str());