Added configurable physics materials per asset in PhysX group in FBX Settings. (#1186)

- Added back the' Physics Materials from Asset' tick in the collider components.
- Made physics materials names case insensitive.
- Refactored how to gather material information from fbx and used the same code for exporter and physx groups.
This commit is contained in:
Aaron Ruiz Mora
2021-06-10 12:22:16 +01:00
committed by GitHub
parent adf6d93a06
commit 9d41954d0e
20 changed files with 374 additions and 231 deletions
+4 -4
View File
@@ -15,12 +15,12 @@
#include <AzFramework/Physics/PropertyTypes.h>
#include <QString>
namespace PhysX
{
namespace Editor
{
static const char* const DefaultPhysicsMaterialLabel = "<Default Physics Material>";
AZ::u32 MaterialIdWidget::GetHandlerName() const
{
return Physics::Edit::MaterialIdSelector;
@@ -74,7 +74,7 @@ namespace PhysX
auto lockToDefault = [gui]()
{
gui->addItem(DefaultPhysicsMaterialLabel);
gui->addItem(QLatin1String(Physics::DefaultPhysicsMaterialLabel.data(), Physics::DefaultPhysicsMaterialLabel.size()));
gui->setCurrentIndex(0);
return false;
};
@@ -103,7 +103,7 @@ namespace PhysX
// Add default physics material first
m_libraryIds.push_back(Physics::MaterialId());
gui->addItem(DefaultPhysicsMaterialLabel);
gui->addItem(QLatin1String(Physics::DefaultPhysicsMaterialLabel.data(), Physics::DefaultPhysicsMaterialLabel.size()));
for (const auto& material : materials)
{