From 8019db34a8a8df0377e39a07b452f6bcc49c6b55 Mon Sep 17 00:00:00 2001 From: Yuriy Toporovskyy Date: Thu, 27 Aug 2020 15:27:57 +0100 Subject: [PATCH] Correctly upgrade PhysX mesh asset description Version 1 had an 'export as convex' field which maps to 'export method' in Version 2 --- dev/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp b/dev/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp index 378cacefa8..db6e7e12e0 100644 --- a/dev/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp +++ b/dev/Gems/PhysX/Code/Source/Pipeline/MeshGroup.cpp @@ -850,6 +850,12 @@ namespace PhysX primitiveAssetParams.m_volumeTermCoefficient = oldValue * 2.0e-5f; } classElement.AddElementWithData(context, "PrimitiveAssetParams", primitiveAssetParams); + + // Convert 'export as convex' to 'export method' + // export as primitive was not previously available + bool exportAsConvex; + readAndRemoveElement(AZ::Crc32("export as convex"), exportAsConvex); + classElement.AddElementWithData(context, "export method", exportAsConvex ? MeshExportMethod::Convex : MeshExportMethod::TriMesh); } return true;