Changing material component property inspector to dockable view pane
• Inspector is locked to a specific entity and material assignment ID • All modifications are made via the material component request bus • Removed complicated configuration management in editor material component • Multiple material property inspectors can be opened • Multiple materials across different entities can be edited simultaneously • No longer blocks the viewport or other interactions • Added functions to material component request bus for retrieving material slot labels, default materials, getting and setting property and UV overrides • Added more asset related types to material property value conversion from any • Added support for static heading widget on top of atom tools inspector, currently used for menus and messages WIP: Still investigating intermittent crash because of corrupt asset property Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
+8
-11
@@ -33,29 +33,26 @@ namespace AZ
|
||||
AZ::Data::AssetId GetDefaultAssetId() const;
|
||||
AZStd::string GetLabel() const;
|
||||
bool HasSourceData() const;
|
||||
void OpenMaterialEditor() const;
|
||||
void ResetToDefaultAsset();
|
||||
|
||||
void SetAsset(const Data::AssetId& assetId);
|
||||
void SetAsset(const Data::Asset<RPI::MaterialAsset>& asset);
|
||||
void Clear();
|
||||
void ClearToDefaultAsset();
|
||||
void ClearOverrides();
|
||||
|
||||
void OpenMaterialExporter();
|
||||
void OpenMaterialEditor() const;
|
||||
void OpenMaterialInspector();
|
||||
void OpenUvNameMapInspector();
|
||||
|
||||
AZ::EntityId m_entityId;
|
||||
MaterialAssignmentId m_id;
|
||||
AZStd::string m_label;
|
||||
Data::Asset<RPI::MaterialAsset> m_materialAsset;
|
||||
Data::Asset<RPI::MaterialAsset> m_defaultMaterialAsset;
|
||||
MaterialPropertyOverrideMap m_propertyOverrides;
|
||||
AZStd::function<void()> m_materialChangedCallback;
|
||||
AZStd::function<void()> m_propertyChangedCallback;
|
||||
|
||||
RPI::MaterialModelUvOverrideMap m_matModUvOverrides;
|
||||
AZStd::unordered_set<AZ::Name> m_modelUvNames; // Cached for override options.
|
||||
|
||||
private:
|
||||
void OpenPopupMenu(const AZ::Data::AssetId& assetId, const AZ::Data::AssetType& assetType);
|
||||
void OnMaterialChanged() const;
|
||||
void OnPropertyChanged() const;
|
||||
void OnDataChanged() const;
|
||||
};
|
||||
|
||||
// Vector of slots for assignable or overridable material data.
|
||||
|
||||
Reference in New Issue
Block a user