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:
@@ -58,10 +58,12 @@ namespace PhysX
|
||||
{
|
||||
editContext->Class<EditorProxyAssetShapeConfig>("EditorProxyShapeConfig", "PhysX Base shape collider")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &EditorProxyAssetShapeConfig::m_pxAsset, "PhysX Mesh", "PhysX mesh collider asset")
|
||||
->Attribute(AZ_CRC_CE("EditButton"), "")
|
||||
->Attribute(AZ_CRC_CE("EditDescription"), "Open in FBX Settings")
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &EditorProxyAssetShapeConfig::m_configuration, "Configuration", "Configuration of asset shape")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly);
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -356,6 +358,7 @@ namespace PhysX
|
||||
[this](const AZ::Data::AssetId& defaultMaterialLibrary)
|
||||
{
|
||||
m_configuration.m_materialSelection.OnMaterialLibraryChanged(defaultMaterialLibrary);
|
||||
UpdateMaterialSlotsFromMeshAsset();
|
||||
|
||||
AzToolsFramework::PropertyEditorGUIMessages::Bus::Broadcast(&AzToolsFramework::PropertyEditorGUIMessages::RequestRefresh,
|
||||
AzToolsFramework::PropertyModificationRefreshLevel::Refresh_AttributesAndValues);
|
||||
|
||||
Reference in New Issue
Block a user