This is a simple data structure for serializing in/out material source files.
More...
#include <MaterialSourceData.h>
|
enum class | ApplyVersionUpdatesResult { Failed
, NoUpdates
, UpdatesApplied
} |
|
using | PropertyValueMap = AZStd::unordered_map< Name, MaterialPropertyValue > |
|
|
static void | Reflect (ReflectContext *context) |
|
static MaterialSourceData | CreateAllPropertyDefaultsMaterial (const Data::Asset< MaterialTypeAsset > &materialType, const AZStd::string &materialTypeSourcePath) |
| Creates a MaterialSourceData object that includes the default values for every possible property in the material type.
|
|
|
AZStd::string | m_description |
|
AZStd::string | m_materialType |
| The material type that defines the interface and behavior of the material.
|
|
AZStd::string | m_parentMaterial |
| The immediate parent of this material.
|
|
uint32_t | m_materialTypeVersion = MaterialAsset::UnspecifiedMaterialTypeVersion |
| The version of the material type that was used to configure this material.
|
|
|
static constexpr const char | Extension [] = "material" |
|
This is a simple data structure for serializing in/out material source files.
◆ CreateMaterialAsset()
Outcome< Data::Asset< MaterialAsset > > AZ::RPI::MaterialSourceData::CreateMaterialAsset |
( |
Data::AssetId |
assetId, |
|
|
const AZStd::string & |
materialSourceFilePath, |
|
|
bool |
elevateWarnings = true |
|
) |
| const |
Creates a MaterialAsset from the MaterialSourceData content.
- Parameters
-
assetId | ID for the MaterialAsset |
materialSourceFilePath | Indicates the path of the .material file that the MaterialSourceData represents. Used for resolving file-relative paths. |
processingMode | Indicates whether to finalize the material asset using data from the MaterialTypeAsset. |
elevateWarnings | Indicates whether to treat warnings as errors |
◆ CreateMaterialAssetFromSourceData()
Outcome< Data::Asset< MaterialAsset > > AZ::RPI::MaterialSourceData::CreateMaterialAssetFromSourceData |
( |
Data::AssetId |
assetId, |
|
|
AZStd::string_view |
materialSourceFilePath = "" , |
|
|
bool |
elevateWarnings = true , |
|
|
MaterialUtils::ImportedJsonFiles * |
sourceDependencies = nullptr |
|
) |
| const |
Creates a MaterialAsset from the MaterialSourceData content.
- Parameters
-
assetId | ID for the MaterialAsset |
materialSourceFilePath | Indicates the path of the .material file that the MaterialSourceData represents. Used for resolving file-relative paths. |
elevateWarnings | Indicates whether to treat warnings as errors |
sourceDependencies | if not null, will be populated with a set of all of the loaded material and material type paths |
◆ UpgradeLegacyFormat()
void AZ::RPI::MaterialSourceData::UpgradeLegacyFormat |
( |
| ) |
|
If the data was loaded from an old format file (i.e. where "properties" was a tree with property values nested under groups), this converts to the new format where properties are stored in a flat list.
The documentation for this class was generated from the following file:
- Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialSourceData.h