Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RPI::MaterialVersionUpdates Class Reference

#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 MaterialVersionUpdateGetVersionUpdate (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)
 

Detailed Description

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.

Member Function Documentation

◆ ApplyPropertyRenames()

bool AZ::RPI::MaterialVersionUpdates::ApplyPropertyRenames ( AZ::Name &  propertyId) const

Apply rename actions to the given propertyId if applicable.

Returns
True iff the propertyId was renamed

◆ ApplyVersionUpdates()

bool AZ::RPI::MaterialVersionUpdates::ApplyVersionUpdates ( MaterialAsset materialAsset,
AZStd::function< void(const char *)>  reportError 
) const

Apply our version updates to the given material asset.

Returns
True iff any changes were made

◆ ValidateUpdates()

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.


The documentation for this class was generated from the following file: