Open 3D Engine AtomLyIntegration 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::Render::EditorMaterialComponentSlot Struct Referencefinal

#include <EditorMaterialComponentSlot.h>

Inherits AZ::Data::AssetBus::Handler, and EditorMaterialSystemComponentNotificationBus::Handler.

Public Member Functions

 AZ_RTTI (EditorMaterialComponentSlot, "{344066EB-7C3D-4E92-B53D-3C9EBD546488}")
 
 AZ_CLASS_ALLOCATOR (EditorMaterialComponentSlot, SystemAllocator)
 
 EditorMaterialComponentSlot (const AZ::EntityId &entityId, const MaterialAssignmentId &materialAssignmentId)
 
AZStd::vector< char > GetPreviewPixmapData () const
 
AZ::Data::AssetId GetActiveAssetId () const
 Returns the overridden asset id if it's valid, otherwise gets the default asseet id.
 
AZ::Data::AssetId GetDefaultAssetId () const
 Returns the default asseet id of the material provded by the model.
 
AZStd::string GetLabel () const
 Returns the display name of the material slot.
 
bool HasSourceData () const
 Returns true if the active material asset has a source material.
 
void SetAsset (const Data::Asset< RPI::MaterialAsset > &asset)
 Assign a new material override asset.
 
void SetAssetId (const Data::AssetId &assetId)
 Assign a new material override asset.
 
void Clear ()
 Remove material and property overrides.
 
void ClearMaterial ()
 Remove material overrides.
 
void ClearProperties ()
 Remove property overrides.
 
void OpenMaterialCanvas () const
 Launch the material canvas.
 
void OpenMaterialEditor () const
 Launch the material editor application and open the active material for this slot.
 
void OpenMaterialExporter (const AzToolsFramework::EntityIdSet &entityIdsToEdit)
 Open the material exporter, aka generate source materials dialog, and apply resulting materials to a set of entities.
 
void OpenMaterialInspector (const AzToolsFramework::EntityIdSet &entityIdsToEdit)
 Open the material instance inspector to edit material property overrides for a set of entities.
 
void OpenUvNameMapInspector (const AzToolsFramework::EntityIdSet &entityIdsToEdit)
 Open the dialog for mapping UV channels for models and materials.
 
void ExportMaterial (const AZStd::string &exportPath, bool overwrite)
 Bypass the UI to export the active material to the export path.
 

Static Public Member Functions

static bool ConvertVersion (AZ::SerializeContext &context, AZ::SerializeContext::DataElementNode &classElement)
 
static void Reflect (ReflectContext *context)
 

Public Attributes

AZ::EntityId m_entityId
 
MaterialAssignmentId m_id
 
Data::Asset< RPI::MaterialAsset > m_materialAsset
 

Detailed Description

Details for a single editable material assignment EditorMaterialComponentSlot will attempt to forward all changes to selected entities for actions invoked from a context menu or entity inspector. The set of selected or pinned entities will be retrieved directly from the inspector. Updates will be applied to the entities and their materials using MaterialComponentRequestBus. Undo and redo for all of those entities will be managed by calls to OnDataChanged.

Member Function Documentation

◆ GetPreviewPixmapData()

AZStd::vector< char > AZ::Render::EditorMaterialComponentSlot::GetPreviewPixmapData ( ) const

Get cached preview image as a buffer to use as an RPE attribute If a cached image isn't avalible then a request will be made to render one


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