Fix parent material loading
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
@@ -235,7 +235,7 @@ namespace AZ
|
||||
{
|
||||
if (!dependencies.insert(parentSourceAbsPath).second)
|
||||
{
|
||||
AZ_Error("MaterialSourceData", false, "Detected circular dependency between materials: '%s' and '%s'.", materialSourceFilePath, parentSourceAbsPath.c_str());
|
||||
AZ_Error("MaterialSourceData", false, "Detected circular dependency between materials: '%s' and '%s'.", materialSourceFilePath.data(), parentSourceAbsPath.c_str());
|
||||
return Failure();
|
||||
}
|
||||
|
||||
|
||||
@@ -756,8 +756,8 @@ namespace MaterialEditor
|
||||
return false;
|
||||
}
|
||||
|
||||
auto parentMaterialAssetResult = m_materialSourceData.CreateMaterialAssetFromSourceData(
|
||||
parentMaterialAssetIdResult.GetValue(), parentMaterialFilePath, true, true, &m_sourceDependencies);
|
||||
auto parentMaterialAssetResult = parentMaterialSourceData.CreateMaterialAssetFromSourceData(
|
||||
parentMaterialAssetIdResult.GetValue(), parentMaterialFilePath, true, true);
|
||||
if (!parentMaterialAssetResult)
|
||||
{
|
||||
AZ_Error("MaterialDocument", false, "Material parent asset could not be created from source data: '%s'.", parentMaterialFilePath.c_str());
|
||||
|
||||
Reference in New Issue
Block a user