From 86c9c04c37718ea7ddadf6ece55fe58f0866c50e Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Thu, 8 Jul 2021 08:02:27 -0500 Subject: [PATCH 1/2] Fixed EMFX nodes min/max attributes. Signed-off-by: Chris Galvan --- .../EMotionFX/Source/BlendTreeLookAtNode.cpp | 8 +++---- .../Source/BlendTreeTransformNode.cpp | 24 +++++++++---------- .../Source/BlendTreeVector3Math2Node.cpp | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp index 57fa502abd..76b788facd 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp @@ -433,12 +433,12 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeLookAtNode::m_limitMin, "Yaw/pitch min", "The minimum rotational yaw and pitch angle limits, in degrees.") ->Attribute(AZ::Edit::Attributes::Visibility, &BlendTreeLookAtNode::GetLimitWidgetsVisibility) - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector2(-90.0f, -90.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector2(90.0f, 90.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -90.0f) + ->Attribute(AZ::Edit::Attributes::Max, 90.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeLookAtNode::m_limitMax, "Yaw/pitch max", "The maximum rotational yaw and pitch angle limits, in degrees.") ->Attribute(AZ::Edit::Attributes::Visibility, &BlendTreeLookAtNode::GetLimitWidgetsVisibility) - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector2(-90.0f, -90.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector2(90.0f, 90.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -90.0f) + ->Attribute(AZ::Edit::Attributes::Max, 90.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeLookAtNode::m_constraintRotation, "Constraint rotation", "A rotation that rotates the constraint space.") ->Attribute(AZ::Edit::Attributes::Visibility, &BlendTreeLookAtNode::GetLimitWidgetsVisibility) ->DataElement(AZ::Edit::UIHandlers::ComboBox, &BlendTreeLookAtNode::m_twistAxis, "Roll axis", "The axis used for twist/roll.") diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp index b8abf2cc90..cfbff381eb 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp @@ -261,23 +261,23 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::ChangeNotify, &BlendTreeTransformNode::Reinit) ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minTranslation, "Min Translation", "The minimum translation value, used when the input translation amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxTranslation, "Max Translation", "The maximum translation value, used when the input translation amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minRotation, "Min Rotation", "The minimum rotation value, in degrees, used when the input rotation amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-360.0f, -360.0f, -360.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(360.0f, 360.0f, 360.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -360.0f) + ->Attribute(AZ::Edit::Attributes::Max, 360.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxRotation, "Max Rotation", "The maximum rotation value, in degrees, used when the input rotation amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-360.0f, -360.0f, -360.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(360.0f, 360.0f, 360.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -360.0f) + ->Attribute(AZ::Edit::Attributes::Max, 360.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minScale, "Min Scale", "The minimum scale value, used when the input scale amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxScale, "Max Scale", "The maximum scale value, used when the input scale amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ; } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp index 2ee0d92dcc..acd9321ede 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp @@ -254,8 +254,8 @@ namespace EMotionFX ->EnumAttribute(MATHFUNCTION_DIVIDE, "Divide") ->EnumAttribute(MATHFUNCTION_ANGLEDEGREES, "AngleDegrees") ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeVector3Math2Node::m_defaultValue, "Default Value", "The default value for x or y when one of them has no incomming connection.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ; } } // namespace EMotionFX From cb069d68f084513261eee819de772842e9dbe632 Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Thu, 8 Jul 2021 11:54:51 -0500 Subject: [PATCH 2/2] Removed min/max settings that were just using the float min/max since these are the default. Signed-off-by: Chris Galvan --- .../Code/EMotionFX/Source/BlendTreeTransformNode.cpp | 8 -------- .../Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp | 2 -- 2 files changed, 10 deletions(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp index cfbff381eb..f67bf831f9 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp @@ -261,11 +261,7 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::ChangeNotify, &BlendTreeTransformNode::Reinit) ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minTranslation, "Min Translation", "The minimum translation value, used when the input translation amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxTranslation, "Max Translation", "The maximum translation value, used when the input translation amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minRotation, "Min Rotation", "The minimum rotation value, in degrees, used when the input rotation amount equals zero.") ->Attribute(AZ::Edit::Attributes::Min, -360.0f) ->Attribute(AZ::Edit::Attributes::Max, 360.0f) @@ -273,11 +269,7 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::Min, -360.0f) ->Attribute(AZ::Edit::Attributes::Max, 360.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minScale, "Min Scale", "The minimum scale value, used when the input scale amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxScale, "Max Scale", "The maximum scale value, used when the input scale amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ; } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp index acd9321ede..356fa78b59 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp @@ -254,8 +254,6 @@ namespace EMotionFX ->EnumAttribute(MATHFUNCTION_DIVIDE, "Divide") ->EnumAttribute(MATHFUNCTION_ANGLEDEGREES, "AngleDegrees") ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeVector3Math2Node::m_defaultValue, "Default Value", "The default value for x or y when one of them has no incomming connection.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ; } } // namespace EMotionFX