Updated Material Editor's MaterialDocument to apply version updates to the materials that it opens.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
santorac
2021-10-21 13:23:18 -07:00
parent b32a6a1369
commit 7ffcbe080e
@@ -685,6 +685,12 @@ namespace MaterialEditor
return false;
}
m_materialTypeSourceData = materialTypeOutcome.GetValue();
if (MaterialSourceData::ApplyVersionUpdatesResult::Failed == m_materialSourceData.ApplyVersionUpdates(m_absolutePath))
{
AZ_Error("MaterialDocument", false, "Material source data could not be auto updated to the latest version of the material type: '%s'.", m_materialSourceData.m_materialType.c_str());
return false;
}
}
else if (AzFramework::StringFunc::Path::IsExtension(m_absolutePath.c_str(), MaterialTypeSourceData::Extension))
{