#include <MaterialVersionUpdate.h>
Public Member Functions | |
AZ_TYPE_INFO (AZ::RPI::MaterialVersionUpdates, "{91EBA78E-83F6-4EA5-916A-A3C81B08137C}") | |
void | AddVersionUpdate (const MaterialVersionUpdate &versionUpdate) |
size_t | GetVersionUpdateCount () const |
const MaterialVersionUpdate & | GetVersionUpdate (size_t i) const |
bool | ValidateUpdates (uint32_t materialTypeVersion, const MaterialPropertiesLayout *materialPropertiesLayout, AZStd::function< void(const char *)> onError) const |
bool | ApplyPropertyRenames (AZ::Name &propertyId) const |
bool | ApplyVersionUpdates (MaterialAsset &materialAsset, AZStd::function< void(const char *)> reportError) const |
Static Public Member Functions | |
static void | Reflect (ReflectContext *context) |
This class takes old MaterialAssets that were created based on outdated MaterialTypeAssets and updates them to align themselves with their latest MaterialTypeAsset, using a series of MaterialVersionUpdate steps.
bool AZ::RPI::MaterialVersionUpdates::ApplyPropertyRenames | ( | AZ::Name & | propertyId | ) | const |
Apply rename actions to the given propertyId
if applicable.
propertyId
was renamed bool AZ::RPI::MaterialVersionUpdates::ApplyVersionUpdates | ( | MaterialAsset & | materialAsset, |
AZStd::function< void(const char *)> | reportError | ||
) | const |
Apply our version updates to the given material asset.
bool AZ::RPI::MaterialVersionUpdates::ValidateUpdates | ( | uint32_t | materialTypeVersion, |
const MaterialPropertiesLayout * | materialPropertiesLayout, | ||
AZStd::function< void(const char *)> | onError | ||
) | const |
Validate our updates against the latest material properties layout materialPropertiesLayout
at material type version materialTypeVersion
.