Added option to disable edit button in asset widgets when there are no asset selected. (#7521)

Added new attribute "DisableEditButtonWheNoAssetSelected" to PropertyAssetCtrl. By default it's false, keeping the original behavior of leaving the edit button enabled and if it's clicked while there is no asset assigned it'll try to create a new one.

PhysX mesh asset property uses now this new feature.

Signed-off-by: moraaar moraaar@amazon.com
This commit is contained in:
moraaar
2022-02-10 12:23:38 +00:00
committed by GitHub
parent 1c3a61983a
commit dac3bc4ba6
3 changed files with 49 additions and 2 deletions
@@ -60,6 +60,7 @@ namespace PhysX
"Specifies the PhysX mesh collider asset for this PhysX collider component.")
->Attribute(AZ_CRC_CE("EditButton"), "")
->Attribute(AZ_CRC_CE("EditDescription"), "Open in Scene Settings")
->Attribute(AZ_CRC_CE("DisableEditButtonWhenNoAssetSelected"), true)
->DataElement(AZ::Edit::UIHandlers::Default, &EditorProxyAssetShapeConfig::m_configuration, "Configuration",
"PhysX mesh asset collider configuration.")
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly);