UX Workflow improvements for Physics Materials (#1237)

- Added button to PhysX Collider Component in PhysX Mesh's field to open FBX Settings.
- Added button Material Selection to open the physics material library in Asset Editor.
- Default Material in PhysX configuration is read only and consistent with the text in combo boxes.
- Material configuration field "Surface Type" renamed to "Name"
- Fixed bug in EditorColliderComponent where the material selection was not updated when changing the library.
- Fixed bug where the materials selection was not set to default when a physics material from the asset was not found in the library.
- Added attributes 'BrowseButtonEnabled' and 'BrowseButtonVisible' to PropertyAssetCtrl.
- Updated physx configuration setreg files of AutomatedTesting project.
This commit is contained in:
Aaron Ruiz Mora
2021-06-10 16:36:38 +01:00
committed by GitHub
parent 2ede3c3dc3
commit 7a053d82e1
22 changed files with 127 additions and 37 deletions
@@ -1130,6 +1130,16 @@ namespace AzToolsFramework
m_browseEdit->setAttachedButtonIcon(icon);
}
void PropertyAssetCtrl::SetBrowseButtonEnabled(bool enabled)
{
m_browseEdit->setEnabled(enabled);
}
void PropertyAssetCtrl::SetBrowseButtonVisible(bool visible)
{
m_browseEdit->setVisible(visible);
}
const QModelIndex PropertyAssetCtrl::GetSourceIndex(const QModelIndex& index)
{
if (!index.isValid())
@@ -1360,6 +1370,22 @@ namespace AzToolsFramework
GUI->SetBrowseButtonIcon(QIcon(iconPath.c_str()));
}
}
else if (attrib == AZ_CRC_CE("BrowseButtonEnabled"))
{
bool enabled = true;
if (attrValue->Read<bool>(enabled))
{
GUI->SetBrowseButtonEnabled(enabled);
}
}
else if (attrib == AZ_CRC_CE("BrowseButtonVisible"))
{
bool visible = true;
if (attrValue->Read<bool>(visible))
{
GUI->SetBrowseButtonVisible(visible);
}
}
else if (attrib == AZ_CRC_CE("Thumbnail"))
{
bool showThumbnail = false;
@@ -208,6 +208,8 @@ namespace AzToolsFramework
void SetEditButtonIcon(const QIcon& icon);
void SetEditButtonTooltip(QString tooltip);
void SetBrowseButtonIcon(const QIcon& icon);
void SetBrowseButtonEnabled(bool enabled);
void SetBrowseButtonVisible(bool visible);
void SetClearButtonEnabled(bool enable);
void SetClearButtonVisible(bool visible);