Implementation of updated handling of Legacy Project importer to better seperate out importer versions as well as more explicit processing of incoming content

This commit is contained in:
JeffR 2022-01-20 01:14:43 -06:00
parent 3812ce2e82
commit ecd35df7e9
14 changed files with 3107 additions and 2663 deletions

View file

@ -2099,22 +2099,28 @@ void AssetImporter::processShapeMaterialInfo(AssetImportObject* assetItem, S32 m
String imgFileName = AssetImporter::findImagePath(testFilePath.getPath() + "/" + testFilePath.getFileName());
if (imgFileName.isNotEmpty())
filePath = imgFileName;
else
filePath = ""; //no luck, so we just won't try importing in the image
}
}
matAssetItem = addImportingAsset("MaterialAsset", shapePathBase + "/" + matName, assetItem, matName);
AssetImportObject* imageAssetItem = addImportingAsset("ImageAsset", filePath, matAssetItem, "");
String suffixType;
String suffix = parseImageSuffixes(imageAssetItem->assetName, &suffixType);
if (suffix.isNotEmpty())
if (!filePath.isEmpty())
{
imageAssetItem->imageSuffixType = suffixType;
}
else
{
//we'll assume it's albedo
imageAssetItem->imageSuffixType = "Albedo";
AssetImportObject* imageAssetItem = addImportingAsset("ImageAsset", filePath, matAssetItem, "");
String suffixType;
String suffix = parseImageSuffixes(imageAssetItem->assetName, &suffixType);
if (suffix.isNotEmpty())
{
imageAssetItem->imageSuffixType = suffixType;
}
else
{
//we'll assume it's albedo
imageAssetItem->imageSuffixType = "Albedo";
}
}
}
else