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:
@@ -311,7 +311,7 @@ namespace PhysX
|
||||
AZStd::string materialName = DefaultMaterialName;
|
||||
if (!localFbxMaterialsList.empty())
|
||||
{
|
||||
int materialId = nodeMesh->GetFaceMaterialId(faceIndex);
|
||||
const int materialId = nodeMesh->GetFaceMaterialId(faceIndex);
|
||||
if (materialId >= localFbxMaterialsList.size())
|
||||
{
|
||||
AZ_TracePrintf(AZ::SceneAPI::Utilities::ErrorWindow,
|
||||
@@ -332,7 +332,7 @@ namespace PhysX
|
||||
}
|
||||
}
|
||||
|
||||
AZ::u16 materialIndex = InsertMaterialIndexByName(materialName, assetMaterialData);
|
||||
const AZ::u16 materialIndex = InsertMaterialIndexByName(materialName, assetMaterialData);
|
||||
assetMaterialData.m_nodesToPerFaceMaterialIndices[nodeName][faceIndex] = materialIndex;
|
||||
}
|
||||
}
|
||||
@@ -729,7 +729,7 @@ namespace PhysX
|
||||
{
|
||||
// Gather material data from asset for the mesh group
|
||||
AZStd::optional<Utils::AssetMaterialsData> assetMaterialData = Utils::GatherMaterialsFromMeshGroup(pxMeshGroup, graph);
|
||||
if (!assetMaterialData)
|
||||
if (!assetMaterialData.has_value())
|
||||
{
|
||||
return SceneEvents::ProcessingResult::Failure;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user