From bed57208da52648913cd7442f5cb9b12213ca208 Mon Sep 17 00:00:00 2001 From: pappeste Date: Fri, 25 Jun 2021 16:29:00 -0700 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFEMotionFX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../EMotionFX/Code/EMotionFX/Source/AnimGraphBindPoseNode.h | 4 ++-- Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphMotionNode.h | 4 ++-- .../Code/EMotionFX/Source/BlendTreeBlend2NodeBase.h | 4 ++-- Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlendNNode.h | 4 ++-- .../Code/EMotionFX/Source/BlendTreeFloatConditionNode.h | 4 ++-- .../Code/EMotionFX/Source/BlendTreeTwoLinkIKNode.h | 4 ++-- .../StandardPlugins/Source/NodeWindow/NodeGroupInfo.cpp | 2 +- Gems/EMotionFX/Code/Tests/AnimGraphDeferredInitTests.cpp | 6 +++--- Gems/EMotionFX/Code/Tests/BlendTreeBlendNNodeTests.cpp | 6 +++--- Gems/EMotionFX/Code/Tests/BlendTreeMaskNodeTests.cpp | 2 +- Gems/EMotionFX/Code/Tests/BoolLogicNodeTests.cpp | 4 ++-- .../Code/Tests/Vector2ToVector3CompatibilityTests.cpp | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphBindPoseNode.h b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphBindPoseNode.h index 042799192d..2d83d21d0d 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphBindPoseNode.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphBindPoseNode.h @@ -28,12 +28,12 @@ namespace EMotionFX AZ_CLASS_ALLOCATOR_DECL // - enum + enum : uint16 { OUTPUTPORT_RESULT = 0 }; - enum + enum : uint16 { PORTID_OUTPUT_POSE = 0 }; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphMotionNode.h b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphMotionNode.h index a07bbc625c..692b81b70e 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphMotionNode.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/AnimGraphMotionNode.h @@ -32,7 +32,7 @@ namespace EMotionFX AZ_RTTI(AnimGraphMotionNode, "{B8B8AAE6-E532-4BF8-898F-3D40AA41BC82}", AnimGraphNode) AZ_CLASS_ALLOCATOR_DECL - enum + enum : uint16 { INPUTPORT_PLAYSPEED = 0, INPUTPORT_INPLACE = 1, @@ -41,7 +41,7 @@ namespace EMotionFX OUTPUTPORT_MOTION = 1 }; - enum + enum : uint16 { PORTID_INPUT_PLAYSPEED = 0, PORTID_INPUT_INPLACE = 1, diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlend2NodeBase.h b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlend2NodeBase.h index 9a9b51b5d1..991fb03472 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlend2NodeBase.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlend2NodeBase.h @@ -26,7 +26,7 @@ namespace EMotionFX using WeightedMaskEntry = AZStd::pair; - enum + enum : uint16 { INPUTPORT_POSE_A = 0, INPUTPORT_POSE_B = 1, @@ -34,7 +34,7 @@ namespace EMotionFX OUTPUTPORT_POSE = 0 }; - enum + enum : uint16 { PORTID_INPUT_POSE_A = 0, PORTID_INPUT_POSE_B = 1, diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlendNNode.h b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlendNNode.h index 72d6ad120c..4f4b8a7ac3 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlendNNode.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeBlendNNode.h @@ -49,7 +49,7 @@ namespace EMotionFX AZ_RTTI(BlendTreeBlendNNode, "{CBFFDE41-008D-45A1-AC2A-E9A25C8CE62A}", AnimGraphNode) AZ_CLASS_ALLOCATOR_DECL - enum + enum : uint16 { INPUTPORT_POSE_0 = 0, INPUTPORT_POSE_1 = 1, @@ -65,7 +65,7 @@ namespace EMotionFX OUTPUTPORT_POSE = 0 }; - enum + enum : uint16 { PORTID_INPUT_POSE_0 = 0, PORTID_INPUT_POSE_1 = 1, diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeFloatConditionNode.h b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeFloatConditionNode.h index 756f6a4bab..fc922934ed 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeFloatConditionNode.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeFloatConditionNode.h @@ -26,7 +26,7 @@ namespace EMotionFX AZ_CLASS_ALLOCATOR_DECL // - enum + enum : uint16 { INPUTPORT_X = 0, INPUTPORT_Y = 1, @@ -34,7 +34,7 @@ namespace EMotionFX OUTPUTPORT_BOOL = 1 }; - enum + enum : uint16 { PORTID_INPUT_X = 0, PORTID_INPUT_Y = 1, diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTwoLinkIKNode.h b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTwoLinkIKNode.h index e39cd7258e..29b497457e 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTwoLinkIKNode.h +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTwoLinkIKNode.h @@ -27,7 +27,7 @@ namespace EMotionFX AZ_RTTI(BlendTreeTwoLinkIKNode, "{0C3E8B7F-F810-47A6-B1A9-27BD4E4B5500}", AnimGraphNode) AZ_CLASS_ALLOCATOR_DECL - enum + enum : uint16 { INPUTPORT_POSE = 0, INPUTPORT_GOALPOS = 1, @@ -37,7 +37,7 @@ namespace EMotionFX OUTPUTPORT_POSE = 0 }; - enum + enum : uint16 { PORTID_INPUT_POSE = 0, PORTID_INPUT_GOALPOS = 1, diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/NodeWindow/NodeGroupInfo.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/NodeWindow/NodeGroupInfo.cpp index f25158ae0d..06b87c2bc2 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/NodeWindow/NodeGroupInfo.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/NodeWindow/NodeGroupInfo.cpp @@ -26,7 +26,7 @@ namespace EMStudio const size_t numGroupNodes = nodeGroup->GetNumNodes(); for (size_t j = 0; j < numGroupNodes; ++j) { - const uint16 nodeIndex = nodeGroup->GetNode(j); + const uint16 nodeIndex = nodeGroup->GetNode(static_cast(j)); const EMotionFX::Node* node = actor->GetSkeleton()->GetNode(nodeIndex); m_nodes.emplace_back(node->GetNameString()); } diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphDeferredInitTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphDeferredInitTests.cpp index aa1bde295a..710cfb790e 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphDeferredInitTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphDeferredInitTests.cpp @@ -126,8 +126,8 @@ namespace EMotionFX blendNNode->SetName(blendNNodeName); blendTree->AddChildNode(blendNNode); - const int motionNodeCount = 5; - for (AZ::u32 i = 0; i < motionNodeCount; ++i) + const uint16 motionNodeCount = 5; + for (uint16 i = 0; i < motionNodeCount; ++i) { AnimGraphMotionNode* motionNode = aznew AnimGraphMotionNode(); motionNode->SetName(AZStd::string::format("Motion %i (%s)", i, blendNNodeName).c_str()); @@ -172,7 +172,7 @@ namespace EMotionFX finalNode->AddConnection(blendNNode, BlendTreeBlendNNode::PORTID_OUTPUT_POSE, BlendTreeFinalNode::PORTID_INPUT_POSE); // Creates 5x blend N nodes as input for the blend N node created here. Each of these five blend N nodes have 5x input motions. - for (AZ::u32 i = 0; i < 5; ++i) + for (uint16 i = 0; i < 5; ++i) { BlendTreeBlendNNode* inputNode = CreateBlendNNode(testBlendTree, parameterNode, AZStd::string::format("InputBlendNode%i", i).c_str()); blendNNode->AddConnection(inputNode, AnimGraphMotionNode::PORTID_OUTPUT_POSE, i); diff --git a/Gems/EMotionFX/Code/Tests/BlendTreeBlendNNodeTests.cpp b/Gems/EMotionFX/Code/Tests/BlendTreeBlendNNodeTests.cpp index 1f9fb9cae3..1f5fb9a512 100644 --- a/Gems/EMotionFX/Code/Tests/BlendTreeBlendNNodeTests.cpp +++ b/Gems/EMotionFX/Code/Tests/BlendTreeBlendNNodeTests.cpp @@ -51,8 +51,8 @@ namespace EMotionFX m_blendTree->AddChildNode(finalNode); finalNode->AddConnection(m_blendNNode, BlendTreeBlendNNode::PORTID_OUTPUT_POSE, BlendTreeFinalNode::PORTID_INPUT_POSE); - const int motionNodeCount = 3; - for (int i = 0; i < motionNodeCount; ++i) + const uint16 motionNodeCount = 3; + for (uint16 i = 0; i < motionNodeCount; ++i) { AnimGraphMotionNode* motionNode = aznew AnimGraphMotionNode(); m_blendTree->AddChildNode(motionNode); @@ -213,7 +213,7 @@ namespace EMotionFX finalNode->AddConnection(m_blendNNode, BlendTreeBlendNNode::PORTID_OUTPUT_POSE, BlendTreeFinalNode::PORTID_INPUT_POSE); ASSERT_TRUE(param.m_motionNodeCount <= 10) << "The blend N node only has 10 pose inputs."; - for (AZ::u32 i = 0; i < param.m_motionNodeCount; ++i) + for (uint16 i = 0; i < param.m_motionNodeCount; ++i) { AnimGraphMotionNode* motionNode = aznew AnimGraphMotionNode(); m_blendTree->AddChildNode(motionNode); diff --git a/Gems/EMotionFX/Code/Tests/BlendTreeMaskNodeTests.cpp b/Gems/EMotionFX/Code/Tests/BlendTreeMaskNodeTests.cpp index b86041c7aa..8bd66ced88 100644 --- a/Gems/EMotionFX/Code/Tests/BlendTreeMaskNodeTests.cpp +++ b/Gems/EMotionFX/Code/Tests/BlendTreeMaskNodeTests.cpp @@ -173,7 +173,7 @@ namespace EMotionFX m_blendTree->AddChildNode(m_basePoseNode); m_maskNode->AddConnection(m_basePoseNode, BlendTreeTestInputNode::OUTPUTPORT_RESULT, BlendTreeMaskNode::INPUTPORT_BASEPOSE); - for (AZ::u32 i = 0; i < m_numMaskInputNodes; ++i) + for (uint16 i = 0; i < m_numMaskInputNodes; ++i) { BlendTreeTestInputNode* inputNode = aznew BlendTreeTestInputNode(static_cast(i)); m_blendTree->AddChildNode(inputNode); diff --git a/Gems/EMotionFX/Code/Tests/BoolLogicNodeTests.cpp b/Gems/EMotionFX/Code/Tests/BoolLogicNodeTests.cpp index 6214005a71..dbf9f18e9e 100644 --- a/Gems/EMotionFX/Code/Tests/BoolLogicNodeTests.cpp +++ b/Gems/EMotionFX/Code/Tests/BoolLogicNodeTests.cpp @@ -53,8 +53,8 @@ namespace EMotionFX m_blendTree->AddChildNode(finalNode); finalNode->AddConnection(m_blendNNode, BlendTreeBlendNNode::PORTID_OUTPUT_POSE, BlendTreeFinalNode::PORTID_INPUT_POSE); - const int motionNodeCount = 2; - for (int i = 0; i < motionNodeCount; ++i) + const uint16 motionNodeCount = 2; + for (uint16 i = 0; i < motionNodeCount; ++i) { AnimGraphMotionNode* motionNode = aznew AnimGraphMotionNode(); m_blendTree->AddChildNode(motionNode); diff --git a/Gems/EMotionFX/Code/Tests/Vector2ToVector3CompatibilityTests.cpp b/Gems/EMotionFX/Code/Tests/Vector2ToVector3CompatibilityTests.cpp index 26702af550..d5ce41cfeb 100644 --- a/Gems/EMotionFX/Code/Tests/Vector2ToVector3CompatibilityTests.cpp +++ b/Gems/EMotionFX/Code/Tests/Vector2ToVector3CompatibilityTests.cpp @@ -46,8 +46,8 @@ namespace EMotionFX m_blendTree->AddChildNode(finalNode); finalNode->AddUnitializedConnection(m_blendNNode, BlendTreeBlendNNode::PORTID_OUTPUT_POSE, BlendTreeFinalNode::PORTID_INPUT_POSE); - const int motionNodeCount = 3; - for (int i = 0; i < motionNodeCount; ++i) + const uint16 motionNodeCount = 3; + for (uint16 i = 0; i < motionNodeCount; ++i) { AnimGraphMotionNode* motionNode = aznew AnimGraphMotionNode(); m_blendTree->AddChildNode(motionNode);