Merge branch 'main' into ly-as-sdk/LYN-2948

This commit is contained in:
pappeste
2021-05-28 08:29:29 -07:00
22 changed files with 581 additions and 140 deletions
@@ -794,6 +794,9 @@ namespace PhysX
);
}
// Convex and primitive methods can only have 1 material
const bool limitToOneMaterial = pxMeshGroup.GetExportAsConvex() || pxMeshGroup.GetExportAsPrimitive();
for (AZ::u32 faceIndex = 0; faceIndex < faceCount; ++faceIndex)
{
AZStd::string materialName = DefaultMaterialName;
@@ -810,6 +813,14 @@ namespace PhysX
}
materialName = localFbxMaterialsList[materialId];
// Keep using the first material when it has to be limited to one.
if (limitToOneMaterial &&
assetMaterialData.m_fbxMaterialNames.size() == 1 &&
assetMaterialData.m_fbxMaterialNames[0] != materialName)
{
materialName = assetMaterialData.m_fbxMaterialNames[0];
}
}
const AZ::SceneAPI::DataTypes::IMeshData::Face& face = nodeMesh->GetFaceInfo(faceIndex);