Adding "Open Material Editor" action to Material Component slot context menu
This commit is contained in:
+6
@@ -172,6 +172,10 @@ namespace AZ
|
||||
{
|
||||
EditorMaterialSystemComponentRequestBus::Broadcast(&EditorMaterialSystemComponentRequestBus::Events::OpenInMaterialEditor, sourcePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorMaterialSystemComponentRequestBus::Broadcast(&EditorMaterialSystemComponentRequestBus::Events::OpenInMaterialEditor, "");
|
||||
}
|
||||
}
|
||||
|
||||
void EditorMaterialComponentSlot::Clear()
|
||||
@@ -273,6 +277,8 @@ namespace AZ
|
||||
|
||||
QAction* action = nullptr;
|
||||
|
||||
menu.addAction("Open Material Editor", [this]() { OpenMaterialEditor(); });
|
||||
|
||||
action = menu.addAction("Clear", [this]() { Clear(); });
|
||||
action->setEnabled(m_materialAsset.GetId().IsValid() || !m_propertyOverrides.empty() || !m_matModUvOverrides.empty());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user