Open 3D Engine AtomLyIntegration Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
MaterialComponentRequestBus provides an interface to request operations on a MaterialComponent. More...
#include <MaterialComponentBus.h>
Inherits AZ::ComponentBus.
Public Member Functions | |
virtual MaterialAssignmentMap | GetDefaultMaterialMap () const =0 |
Get a map representing the default layout and values for all material assignment slots on the source model or object. | |
virtual MaterialAssignmentMap | GetDefautMaterialMap () const |
virtual MaterialAssignmentId | FindMaterialAssignmentId (const MaterialAssignmentLodIndex lod, const AZStd::string &label) const =0 |
virtual AZ::Data::AssetId | GetDefaultMaterialAssetId (const MaterialAssignmentId &materialAssignmentId) const =0 |
virtual AZStd::string | GetMaterialLabel (const MaterialAssignmentId &materialAssignmentId) const =0 |
virtual void | SetMaterialMap (const MaterialAssignmentMap &materials)=0 |
virtual const MaterialAssignmentMap & | GetMaterialMap () const =0 |
virtual void | ClearMaterialMap ()=0 |
Clears all overridden materials and properties from the material component. | |
virtual void | ClearMaterialsOnModelSlots ()=0 |
Clears all overrides from the material component not associated with a specific LOD. | |
virtual void | ClearMaterialsOnLodSlots ()=0 |
Clears all overrides from the material component associated with a specific LOD. | |
virtual void | ClearMaterialsOnInvalidSlots ()=0 |
virtual void | ClearMaterialsWithMissingAssets ()=0 |
Clears all material overrides referencing material assets that cant' be located. | |
virtual void | RepairMaterialsWithMissingAssets ()=0 |
virtual uint32_t | RepairMaterialsWithRenamedProperties ()=0 |
virtual void | SetMaterialAssetIdOnDefaultSlot (const AZ::Data::AssetId &materialAssetId)=0 |
virtual const AZ::Data::AssetId | GetMaterialAssetIdOnDefaultSlot () const =0 |
Convenience function to get the current material asset on the default material slot. | |
virtual void | ClearMaterialAssetIdOnDefaultSlot ()=0 |
Convenience function to clear be over written material has set on the default material slot. | |
virtual void | SetMaterialAssetId (const MaterialAssignmentId &materialAssignmentId, const AZ::Data::AssetId &materialAssetId)=0 |
virtual AZ::Data::AssetId | GetMaterialAssetId (const MaterialAssignmentId &materialAssignmentId) const =0 |
virtual void | ClearMaterialAssetId (const MaterialAssignmentId &materialAssignmentId)=0 |
virtual bool | IsMaterialAssetIdOverridden (const MaterialAssignmentId &materialAssignmentId) const =0 |
virtual bool | HasPropertiesOverridden (const MaterialAssignmentId &materialAssignmentId) const =0 |
virtual void | SetPropertyValue (const MaterialAssignmentId &materialAssignmentId, const AZStd::string &propertyName, const AZStd::any &value)=0 |
virtual AZStd::any | GetPropertyValue (const MaterialAssignmentId &materialAssignmentId, const AZStd::string &propertyName) const =0 |
virtual void | ClearPropertyValue (const MaterialAssignmentId &materialAssignmentId, const AZStd::string &propertyName)=0 |
virtual void | ClearPropertyValues (const MaterialAssignmentId &materialAssignmentId)=0 |
virtual void | ClearAllPropertyValues ()=0 |
Clear all property overrides for every material in the material component. | |
virtual void | SetPropertyValues (const MaterialAssignmentId &materialAssignmentId, const MaterialPropertyOverrideMap &propertyOverrides)=0 |
virtual MaterialPropertyOverrideMap | GetPropertyValues (const MaterialAssignmentId &materialAssignmentId) const =0 |
virtual void | SetModelUvOverrides (const MaterialAssignmentId &materialAssignmentId, const AZ::RPI::MaterialModelUvOverrideMap &modelUvOverrides)=0 |
virtual AZ::RPI::MaterialModelUvOverrideMap | GetModelUvOverrides (const MaterialAssignmentId &materialAssignmentId) const =0 |
template<typename T > | |
void | SetPropertyValueT (const MaterialAssignmentId &materialAssignmentId, const AZStd::string &propertyName, const T &value) |
Set material property override value with a specific type. | |
template<typename T > | |
T | GetPropertyValueT (const MaterialAssignmentId &materialAssignmentId, const AZStd::string &propertyName) const |
Get material property override value with a specific type. | |
MaterialComponentRequestBus provides an interface to request operations on a MaterialComponent.
|
pure virtual |
Removes the material asset associated with the material assignment ID
materialAssignmentId | ID of material slot. |
|
pure virtual |
Clear all material overrides from the material component mapped to material assignment IDs that do not match the current material layout. This is usually used for clearing materials leftover between model changes or moving the material component from one entity to another.
|
pure virtual |
Clear any property override associated with the material assignment ID and property name.
materialAssignmentId | ID of material slot. |
propertyName | Name of the property being cleared. |
|
pure virtual |
Clear all property overrides associated with the material assignment ID.
materialAssignmentId | ID of material slot. |
|
pure virtual |
Search for a material assignment ID matching the lod and label parameters
lod | Index of the LOD to be searched for the material assignment ID. -1 is used to search the default material and model material slots. |
label | Substring used to look up a material assignment ID with a matching label. |
|
pure virtual |
Get the material asset associated with the source model or object prior to overrides being applied.
materialAssignmentId | ID of material assignment slot for which the information is being requested. |
|
pure virtual |
Retrieve the material asset associated with the material assignment ID
materialAssignmentId | ID of material slot. |
|
pure virtual |
Get the material asset associated with the source model or object prior to overrides being applied.
materialAssignmentId | ID of material assignment slot for which the information is being requested. |
|
pure virtual |
Returns all materials and properties used by the material component.
|
pure virtual |
Get Model UV overrides for a specific material assignment
materialAssignmentId | ID of material slot. |
|
pure virtual |
Get the current value of a material property wrapped by an AZStd::any
materialAssignmentId | ID of material slot. |
propertyName | Name of the property being requested. |
|
pure virtual |
Retrieves a map of all property values associated with the material assignment ID.
materialAssignmentId | ID of material slot. |
|
pure virtual |
Check if the material slot contains any overridden property values
materialAssignmentId | ID of material slot. |
|
pure virtual |
Check if the material slot contains an explicit material asset override
materialAssignmentId | ID of material slot. |
|
pure virtual |
Updates all material overrides referencing material assets that can't be located to instead point to a default material asset.
|
pure virtual |
Remaps material property overrides that have been renamed since they were assigned.
|
pure virtual |
Assign a material asset to the slot corresponding to material assignment ID
materialAssignmentId | ID of material slot that the material will be assigned to. |
materialAssetId | Material asset that will be assigned to the material slot. |
|
pure virtual |
Convenience function to set the overridden material asset on the default material slot.
materialAssetId | Material asset that will be assigned to the default material slot. |
|
pure virtual |
Replaces all material and property overrides with whatever is contained in the provided map.
materials | Map of material assignment data including materials, property overrides, and other parameters. |
|
pure virtual |
Set Model UV overrides for a specific material assignment
materialAssignmentId | ID of material slot. |
modelUvOverrides | Map of remapped UV channels. |
|
pure virtual |
Set a material property override value wrapped by an AZStd::any
materialAssignmentId | ID of material slot. |
propertyName | Name of the property being assigned. |
value | Value to be assigned to the specified property. |
|
pure virtual |
Replaces all property overrides associated with the material assignment ID.
materialAssignmentId | ID of material slot. |
propertyOverrides | Map of all property values being assigned. |