mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
from @OTHGMars: AssetImporter type and path for material look-ups.
(and fix for pbrconfig<map> entry)
This commit is contained in:
parent
6153d3c27b
commit
284ad3e083
|
|
@ -1345,7 +1345,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
for (U32 i = 0; i < suffixCount; i++)
|
||||
{
|
||||
//First, try checking based on the material's assetName for our patternbase
|
||||
String testPath = assetItem->filePath.getPath();
|
||||
String testPath = assetItem->filePath.getRootAndPath();
|
||||
testPath += "/" + assetItem->cleanAssetName + StringUnit::getUnit(suffixList.c_str(), i, ",;");
|
||||
|
||||
String imagePath = AssetImporter::findImagePath(testPath);
|
||||
|
|
@ -1355,7 +1355,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
//got a match!
|
||||
AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, "");
|
||||
|
||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)i);
|
||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t);
|
||||
|
||||
matchedImageTypes[t] = newImageAssetObj;
|
||||
break;
|
||||
|
|
@ -1364,7 +1364,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
{
|
||||
if(materialImageNoSuffix.isNotEmpty())
|
||||
{
|
||||
testPath = assetItem->filePath.getPath();
|
||||
testPath = assetItem->filePath.getRootAndPath();
|
||||
testPath += "/" + materialImageNoSuffix + StringUnit::getUnit(suffixList.c_str(), i, ",;");
|
||||
|
||||
imagePath = AssetImporter::findImagePath(testPath);
|
||||
|
|
@ -1374,7 +1374,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
//got a match!
|
||||
AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, "");
|
||||
|
||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)i);
|
||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t);
|
||||
|
||||
matchedImageTypes[t] = newImageAssetObj;
|
||||
break;
|
||||
|
|
@ -2337,7 +2337,7 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
|||
}
|
||||
else if (imageType == ImageAsset::ImageTypes::PBRConfig)
|
||||
{
|
||||
mapFieldName = "PBRConfig";
|
||||
mapFieldName = "PBRConfigMap";
|
||||
}
|
||||
else if (imageType == ImageAsset::ImageTypes::Metalness)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue