mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
Merge pull request #277 from Azaezel/alpha40_matAssetMangles
from @OTHGMars: AssetImporter type and path for material look-ups.
This commit is contained in:
commit
08f8d8abf2
1 changed files with 5 additions and 5 deletions
|
|
@ -1345,7 +1345,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
||||||
for (U32 i = 0; i < suffixCount; i++)
|
for (U32 i = 0; i < suffixCount; i++)
|
||||||
{
|
{
|
||||||
//First, try checking based on the material's assetName for our patternbase
|
//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, ",;");
|
testPath += "/" + assetItem->cleanAssetName + StringUnit::getUnit(suffixList.c_str(), i, ",;");
|
||||||
|
|
||||||
String imagePath = AssetImporter::findImagePath(testPath);
|
String imagePath = AssetImporter::findImagePath(testPath);
|
||||||
|
|
@ -1355,7 +1355,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
||||||
//got a match!
|
//got a match!
|
||||||
AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, "");
|
AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, "");
|
||||||
|
|
||||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)i);
|
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t);
|
||||||
|
|
||||||
matchedImageTypes[t] = newImageAssetObj;
|
matchedImageTypes[t] = newImageAssetObj;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1364,7 +1364,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
||||||
{
|
{
|
||||||
if(materialImageNoSuffix.isNotEmpty())
|
if(materialImageNoSuffix.isNotEmpty())
|
||||||
{
|
{
|
||||||
testPath = assetItem->filePath.getPath();
|
testPath = assetItem->filePath.getRootAndPath();
|
||||||
testPath += "/" + materialImageNoSuffix + StringUnit::getUnit(suffixList.c_str(), i, ",;");
|
testPath += "/" + materialImageNoSuffix + StringUnit::getUnit(suffixList.c_str(), i, ",;");
|
||||||
|
|
||||||
imagePath = AssetImporter::findImagePath(testPath);
|
imagePath = AssetImporter::findImagePath(testPath);
|
||||||
|
|
@ -1374,7 +1374,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
||||||
//got a match!
|
//got a match!
|
||||||
AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, "");
|
AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, "");
|
||||||
|
|
||||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)i);
|
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t);
|
||||||
|
|
||||||
matchedImageTypes[t] = newImageAssetObj;
|
matchedImageTypes[t] = newImageAssetObj;
|
||||||
break;
|
break;
|
||||||
|
|
@ -2337,7 +2337,7 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
||||||
}
|
}
|
||||||
else if (imageType == ImageAsset::ImageTypes::PBRConfig)
|
else if (imageType == ImageAsset::ImageTypes::PBRConfig)
|
||||||
{
|
{
|
||||||
mapFieldName = "PBRConfig";
|
mapFieldName = "PBRConfigMap";
|
||||||
}
|
}
|
||||||
else if (imageType == ImageAsset::ImageTypes::Metalness)
|
else if (imageType == ImageAsset::ImageTypes::Metalness)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue