EMotionFX
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -192,7 +192,7 @@ namespace EMotionFX
|
||||
const size_t numLodLevels = m_meshLodData.m_lodLevels.size();
|
||||
MeshLODData& resultMeshLodData = result->m_meshLodData;
|
||||
|
||||
result->SetNumLODLevels(numLodLevels);
|
||||
result->SetNumLODLevels(static_cast<uint32>(numLodLevels));
|
||||
for (size_t lodLevel = 0; lodLevel < numLodLevels; ++lodLevel)
|
||||
{
|
||||
const MCore::Array<NodeLODInfo>& nodeInfos = m_meshLodData.m_lodLevels[lodLevel].mNodeInfos;
|
||||
@@ -319,10 +319,10 @@ namespace EMotionFX
|
||||
// get the number of nodes, iterate through them, create a new LOD level and copy over the meshes from the last LOD level
|
||||
for (size_t i = 0; i < numNodes; ++i)
|
||||
{
|
||||
NodeLODInfo& newLODInfo = lodLevels[lodIndex].mNodeInfos[i];
|
||||
NodeLODInfo& newLODInfo = lodLevels[lodIndex].mNodeInfos[static_cast<uint32>(i)];
|
||||
if (copyFromLastLODLevel && lodIndex > 0)
|
||||
{
|
||||
const NodeLODInfo& prevLODInfo = lodLevels[lodIndex - 1].mNodeInfos[i];
|
||||
const NodeLODInfo& prevLODInfo = lodLevels[lodIndex - 1].mNodeInfos[static_cast<uint32>(i)];
|
||||
newLODInfo.mMesh = (prevLODInfo.mMesh) ? prevLODInfo.mMesh->Clone() : nullptr;
|
||||
newLODInfo.mStack = (prevLODInfo.mStack) ? prevLODInfo.mStack->Clone(newLODInfo.mMesh) : nullptr;
|
||||
}
|
||||
@@ -334,8 +334,8 @@ namespace EMotionFX
|
||||
}
|
||||
|
||||
// create a new material array for the new LOD level
|
||||
mMaterials.Resize(lodLevels.size());
|
||||
mMaterials[lodIndex].SetMemoryCategory(EMFX_MEMCATEGORY_ACTORS);
|
||||
mMaterials.Resize(static_cast<uint32>(lodLevels.size()));
|
||||
mMaterials[static_cast<uint32>(lodIndex)].SetMemoryCategory(EMFX_MEMCATEGORY_ACTORS);
|
||||
|
||||
// create an empty morph setup for the new LOD level
|
||||
mMorphSetups.Add(nullptr);
|
||||
@@ -343,7 +343,7 @@ namespace EMotionFX
|
||||
// copy data from the previous LOD level if wanted
|
||||
if (copyFromLastLODLevel && numLODs > 0)
|
||||
{
|
||||
CopyLODLevel(this, lodIndex - 1, numLODs - 1, true);
|
||||
CopyLODLevel(this, static_cast<uint32>(lodIndex - 1), static_cast<uint32>(numLODs - 1), true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1209,7 +1209,7 @@ namespace EMotionFX
|
||||
Node* node = mSkeleton->GetNode(n);
|
||||
|
||||
// check if this node has a mesh, if not we can skip it
|
||||
Mesh* mesh = GetMesh(geomLod, n);
|
||||
Mesh* mesh = GetMesh(static_cast<uint32>(geomLod), n);
|
||||
if (mesh == nullptr)
|
||||
{
|
||||
continue;
|
||||
@@ -1245,10 +1245,10 @@ namespace EMotionFX
|
||||
{
|
||||
// if the bone is disabled
|
||||
SkinInfluence* influence = layer->GetInfluence(orgVertex, i);
|
||||
if (mSkeleton->GetNode(influence->GetNodeNr())->GetSkeletalLODStatus(geomLod) == false)
|
||||
if (mSkeleton->GetNode(influence->GetNodeNr())->GetSkeletalLODStatus(static_cast<uint32>(geomLod)) == false)
|
||||
{
|
||||
// find the first parent bone that is enabled in this LOD
|
||||
const uint32 newNodeIndex = FindFirstActiveParentBone(geomLod, influence->GetNodeNr());
|
||||
const uint32 newNodeIndex = FindFirstActiveParentBone(static_cast<uint32>(geomLod), influence->GetNodeNr());
|
||||
if (newNodeIndex == MCORE_INVALIDINDEX32)
|
||||
{
|
||||
MCore::LogWarning("EMotionFX::Actor::MakeGeomLODsCompatibleWithSkeletalLODs() - Failed to find an enabled parent for node '%s' in skeletal LOD %d of actor '%s' (0x%x)", node->GetName(), geomLod, GetFileName(), this);
|
||||
@@ -1273,10 +1273,10 @@ namespace EMotionFX
|
||||
} // for all submeshes
|
||||
|
||||
// reinit the mesh deformer stacks
|
||||
MeshDeformerStack* stack = GetMeshDeformerStack(geomLod, node->GetNodeIndex());
|
||||
MeshDeformerStack* stack = GetMeshDeformerStack(static_cast<uint32>(geomLod), node->GetNodeIndex());
|
||||
if (stack)
|
||||
{
|
||||
stack->ReinitializeDeformers(this, node, geomLod);
|
||||
stack->ReinitializeDeformers(this, node, static_cast<uint32>(geomLod));
|
||||
}
|
||||
} // for all nodes
|
||||
}
|
||||
@@ -1519,7 +1519,7 @@ namespace EMotionFX
|
||||
{
|
||||
// Optional, not all actors have morph targets.
|
||||
const size_t numLODLevels = m_meshAsset->GetLodAssets().size();
|
||||
mMorphSetups.Resize(numLODLevels);
|
||||
mMorphSetups.Resize(static_cast<uint32>(numLODLevels));
|
||||
for (AZ::u32 i = 0; i < numLODLevels; ++i)
|
||||
{
|
||||
mMorphSetups[i] = nullptr;
|
||||
@@ -1588,7 +1588,7 @@ namespace EMotionFX
|
||||
const uint32 orgVertex = orgVertices[startVertex + vertexIndex];
|
||||
|
||||
// for all skinning influences of the vertex
|
||||
const uint32 numInfluences = layer->GetNumInfluences(orgVertex);
|
||||
const uint32 numInfluences = static_cast<uint32>(layer->GetNumInfluences(orgVertex));
|
||||
float maxWeight = 0.0f;
|
||||
uint32 maxWeightNodeIndex = 0;
|
||||
for (uint32 i = 0; i < numInfluences; ++i)
|
||||
@@ -2786,13 +2786,13 @@ namespace EMotionFX
|
||||
const size_t numLODLevels = lodAssets.size();
|
||||
|
||||
lodLevels.clear();
|
||||
SetNumLODLevels(numLODLevels, /*adjustMorphSetup=*/false);
|
||||
SetNumLODLevels(static_cast<uint32>(numLODLevels), /*adjustMorphSetup=*/false);
|
||||
const uint32 numNodes = mSkeleton->GetNumNodes();
|
||||
|
||||
// Remove all the materials and add them back based on the meshAsset. Eventually we will remove all the material from Actor and
|
||||
// GLActor.
|
||||
RemoveAllMaterials();
|
||||
mMaterials.Resize(numLODLevels);
|
||||
mMaterials.Resize(static_cast<uint32>(numLODLevels));
|
||||
|
||||
for (size_t lodLevel = 0; lodLevel < numLODLevels; ++lodLevel)
|
||||
{
|
||||
@@ -2845,19 +2845,19 @@ namespace EMotionFX
|
||||
DualQuatSkinDeformer* skinDeformer = DualQuatSkinDeformer::Create(mesh);
|
||||
jointInfo.mStack->AddDeformer(skinDeformer);
|
||||
skinDeformer->ReserveLocalBones(numLocalJoints);
|
||||
skinDeformer->Reinitialize(this, meshJoint, lodLevel);
|
||||
skinDeformer->Reinitialize(this, meshJoint, static_cast<uint32>(lodLevel));
|
||||
}
|
||||
else
|
||||
{
|
||||
SoftSkinDeformer* skinDeformer = GetSoftSkinManager().CreateDeformer(mesh);
|
||||
jointInfo.mStack->AddDeformer(skinDeformer);
|
||||
skinDeformer->ReserveLocalBones(numLocalJoints); // pre-alloc data to prevent reallocs
|
||||
skinDeformer->Reinitialize(this, meshJoint, lodLevel);
|
||||
skinDeformer->Reinitialize(this, meshJoint, static_cast<uint32>(lodLevel));
|
||||
}
|
||||
}
|
||||
|
||||
// Add material for this mesh
|
||||
AddMaterial(lodLevel, Material::Create(GetName()));
|
||||
AddMaterial(static_cast<uint32>(lodLevel), Material::Create(GetName()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2919,7 +2919,7 @@ namespace EMotionFX
|
||||
const AZ::Data::Asset<AZ::RPI::ModelLodAsset>& lodAsset = lodAssets[lodLevel];
|
||||
const AZStd::array_view<AZ::RPI::ModelLodAsset::Mesh>& sourceMeshes = lodAsset->GetMeshes();
|
||||
|
||||
MorphSetup* morphSetup = mMorphSetups[lodLevel];
|
||||
MorphSetup* morphSetup = mMorphSetups[static_cast<uint32>(lodLevel)];
|
||||
if (!morphSetup)
|
||||
{
|
||||
continue;
|
||||
@@ -3029,7 +3029,7 @@ namespace EMotionFX
|
||||
}
|
||||
|
||||
// Sync the deformer passes with the morph target deform datas.
|
||||
morphTargetDeformer->Reinitialize(this, meshJoint, lodLevel);
|
||||
morphTargetDeformer->Reinitialize(this, meshJoint, static_cast<uint32>(lodLevel));
|
||||
}
|
||||
}
|
||||
} // namespace EMotionFX
|
||||
|
||||
@@ -327,7 +327,7 @@ namespace EMotionFX
|
||||
AZ::Outcome<size_t> boneIndexOutcome = FindLocalBoneIndex(influence->GetNodeNr());
|
||||
if (boneIndexOutcome.IsSuccess())
|
||||
{
|
||||
influence->SetBoneNr(boneIndexOutcome.GetValue());
|
||||
influence->SetBoneNr(static_cast<uint16>(boneIndexOutcome.GetValue()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ MCORE_INLINE void KeyTrackLinearDynamic<ReturnType, StorageType>::AddKey(float t
|
||||
template <class ReturnType, class StorageType>
|
||||
MCORE_INLINE uint32 KeyTrackLinearDynamic<ReturnType, StorageType>::FindKeyNumber(float curTime) const
|
||||
{
|
||||
return KeyFrameFinder<ReturnType, StorageType>::FindKey(curTime, &mKeys.front(), mKeys.size());
|
||||
return KeyFrameFinder<ReturnType, StorageType>::FindKey(curTime, &mKeys.front(), static_cast<uint32>(mKeys.size()));
|
||||
}
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ void KeyTrackLinearDynamic<ReturnType, StorageType>::AddKeySorted(float time, co
|
||||
{
|
||||
if (mKeys.capacity() == mKeys.size())
|
||||
{
|
||||
const uint32 numToReserve = mKeys.size() / 4;
|
||||
const uint32 numToReserve = static_cast<uint32>(mKeys.size() / 4);
|
||||
mKeys.reserve(mKeys.capacity() + numToReserve);
|
||||
}
|
||||
}
|
||||
@@ -385,7 +385,7 @@ void KeyTrackLinearDynamic<ReturnType, StorageType>::AddKeySorted(float time, co
|
||||
}
|
||||
|
||||
// quickly find the location to insert, and insert it
|
||||
const uint32 place = KeyFrameFinder<ReturnType, StorageType>::FindKey(keyTime, &mKeys.front(), mKeys.size());
|
||||
const uint32 place = KeyFrameFinder<ReturnType, StorageType>::FindKey(keyTime, &mKeys.front(), static_cast<uint32>(mKeys.size()));
|
||||
mKeys.insert(mKeys.begin() + place + 1, KeyFrame<ReturnType, StorageType>(time, value));
|
||||
}
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace EMotionFX
|
||||
{
|
||||
// Atom stores the skin indices as uint16, but the buffer itself is a buffer of uint32 with two id's per element
|
||||
size_t influenceCount = elementCountInBytes / sizeof(AZ::u16);
|
||||
maxSkinInfluences = influenceCount / modelVertexCount;
|
||||
maxSkinInfluences = static_cast<AZ::u8>(influenceCount / modelVertexCount);
|
||||
AZ_Assert(maxSkinInfluences > 0 && maxSkinInfluences < 100, "Expect max skin influences in a reasonable value range.");
|
||||
AZ_Assert(influenceCount % modelVertexCount == 0, "Expect an equal number of influences for each vertex.");
|
||||
AZ_Assert(bufferAssetViewDescriptor.m_elementSize == 4, "Expect skin joint indices to be stored in a raw 32-bit per element buffer");
|
||||
@@ -279,7 +279,7 @@ namespace EMotionFX
|
||||
{
|
||||
// Atom stores joint weights as float (range 0 - 1)
|
||||
size_t influenceCount = elementCountInBytes / sizeof(float);
|
||||
maxSkinInfluences = influenceCount / modelVertexCount;
|
||||
maxSkinInfluences = static_cast<AZ::u8>(influenceCount / modelVertexCount);
|
||||
AZ_Assert(maxSkinInfluences > 0 && maxSkinInfluences < 100, "Expect max skin influences in a reasonable value range.");
|
||||
skinWeights = static_cast<const float*>(bufferData) + bufferAssetViewDescriptor.m_elementOffset;
|
||||
}
|
||||
@@ -290,7 +290,7 @@ namespace EMotionFX
|
||||
AZ::u32* originalVertexDataRaw = static_cast<AZ::u32*>(originalVertexData->GetData());
|
||||
for (size_t i = 0; i < modelVertexCount; ++i)
|
||||
{
|
||||
originalVertexDataRaw[i] = i;
|
||||
originalVertexDataRaw[i] = static_cast<AZ::u32>(i);
|
||||
}
|
||||
mesh->AddVertexAttributeLayer(originalVertexData);
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ namespace EMotionFX
|
||||
// now we have located the skinning information for this vertex, we can see if our bones array
|
||||
// already contains the bone it uses by traversing all influences for this vertex, and checking
|
||||
// if the bone of that influence already is in the array with used bones
|
||||
const uint32 numInfluences = GetNumInfluences(i);
|
||||
const uint32 numInfluences = static_cast<uint32>(GetNumInfluences(i));
|
||||
for (uint32 a = 0; a < numInfluences; ++a)
|
||||
{
|
||||
EMotionFX::SkinInfluence* influence = GetInfluence(i, a);
|
||||
|
||||
+10
-10
@@ -327,7 +327,7 @@ namespace EMStudio
|
||||
EMotionFX::AnimGraphGameControllerSettings& gameControllerSettings = animGraph->GetGameControllerSettings();
|
||||
|
||||
// in case there is no preset yet create a default one
|
||||
uint32 numPresets = gameControllerSettings.GetNumPresets();
|
||||
uint32 numPresets = static_cast<uint32>(gameControllerSettings.GetNumPresets());
|
||||
if (numPresets == 0)
|
||||
{
|
||||
EMotionFX::AnimGraphGameControllerSettings::Preset* preset = aznew EMotionFX::AnimGraphGameControllerSettings::Preset("Default");
|
||||
@@ -374,7 +374,7 @@ namespace EMStudio
|
||||
QLabel* label = new QLabel(labelString.c_str());
|
||||
label->setToolTip(parameter->GetDescription().c_str());
|
||||
label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
mParameterGridLayout->addWidget(label, parameterIndex, 0);
|
||||
mParameterGridLayout->addWidget(label, static_cast<int>(parameterIndex), 0);
|
||||
|
||||
// add the axis combo box to the layout
|
||||
QComboBox* axesComboBox = new QComboBox();
|
||||
@@ -434,7 +434,7 @@ namespace EMStudio
|
||||
|
||||
// select the given axis in the combo box or select none if there is no assignment yet or the assigned axis wasn't found on the current game controller
|
||||
axesComboBox->setCurrentIndex(selectedComboItem);
|
||||
mParameterGridLayout->addWidget(axesComboBox, parameterIndex, 1);
|
||||
mParameterGridLayout->addWidget(axesComboBox, static_cast<int>(parameterIndex), 1);
|
||||
|
||||
// add the mode combo box to the layout
|
||||
QComboBox* modeComboBox = new QComboBox();
|
||||
@@ -447,7 +447,7 @@ namespace EMStudio
|
||||
modeComboBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
||||
connect(modeComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &GameControllerWindow::OnParameterModeComboBox);
|
||||
modeComboBox->setCurrentIndex(settingsInfo->m_mode);
|
||||
mParameterGridLayout->addWidget(modeComboBox, parameterIndex, 2);
|
||||
mParameterGridLayout->addWidget(modeComboBox, static_cast<int>(parameterIndex), 2);
|
||||
|
||||
// add the invert checkbox to the layout
|
||||
QHBoxLayout* invertCheckBoxLayout = new QHBoxLayout();
|
||||
@@ -460,7 +460,7 @@ namespace EMStudio
|
||||
connect(invertCheckbox, &QCheckBox::stateChanged, this, &GameControllerWindow::OnInvertCheckBoxChanged);
|
||||
invertCheckbox->setCheckState(settingsInfo->m_invert ? Qt::Checked : Qt::Unchecked);
|
||||
invertCheckBoxLayout->addWidget(invertCheckbox);
|
||||
mParameterGridLayout->addLayout(invertCheckBoxLayout, parameterIndex, 3);
|
||||
mParameterGridLayout->addLayout(invertCheckBoxLayout, static_cast<int>(parameterIndex), 3);
|
||||
|
||||
// add the current value edit field to the layout
|
||||
QLineEdit* valueEdit = new QLineEdit();
|
||||
@@ -469,7 +469,7 @@ namespace EMStudio
|
||||
valueEdit->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
valueEdit->setMinimumWidth(70);
|
||||
valueEdit->setMaximumWidth(70);
|
||||
mParameterGridLayout->addWidget(valueEdit, parameterIndex, 4);
|
||||
mParameterGridLayout->addWidget(valueEdit, static_cast<int>(parameterIndex), 4);
|
||||
|
||||
// create the parameter info and add it to the array
|
||||
ParameterInfo paramInfo;
|
||||
@@ -1053,7 +1053,7 @@ namespace EMStudio
|
||||
// get the game controller settings from the current anim graph
|
||||
EMotionFX::AnimGraphGameControllerSettings& gameControllerSettings = mAnimGraph->GetGameControllerSettings();
|
||||
|
||||
uint32 presetNumber = gameControllerSettings.GetNumPresets();
|
||||
uint32 presetNumber = static_cast<uint32>(gameControllerSettings.GetNumPresets());
|
||||
mString = AZStd::string::format("Preset %d", presetNumber);
|
||||
while (gameControllerSettings.FindPresetIndexByName(mString.c_str()) != MCORE_INVALIDINDEX32)
|
||||
{
|
||||
@@ -1123,7 +1123,7 @@ namespace EMStudio
|
||||
// get the currently selected preset
|
||||
uint32 presetIndex = mPresetComboBox->currentIndex();
|
||||
|
||||
uint32 newValueIndex = gameControllerSettings.FindPresetIndexByName(newValue.c_str());
|
||||
uint32 newValueIndex = static_cast<uint32>(gameControllerSettings.FindPresetIndexByName(newValue.c_str()));
|
||||
if (newValueIndex == MCORE_INVALIDINDEX32)
|
||||
{
|
||||
EMotionFX::AnimGraphGameControllerSettings::Preset* preset = gameControllerSettings.GetPreset(presetIndex);
|
||||
@@ -1139,7 +1139,7 @@ namespace EMStudio
|
||||
EMotionFX::AnimGraphGameControllerSettings& gameControllerSettings = mAnimGraph->GetGameControllerSettings();
|
||||
|
||||
// check if there already is a preset with the currently entered name
|
||||
uint32 presetIndex = gameControllerSettings.FindPresetIndexByName(FromQtString(text).c_str());
|
||||
uint32 presetIndex = static_cast<uint32>(gameControllerSettings.FindPresetIndexByName(FromQtString(text).c_str()));
|
||||
if (presetIndex != MCORE_INVALIDINDEX32 && presetIndex != gameControllerSettings.GetActivePresetIndex())
|
||||
{
|
||||
GetManager()->SetWidgetAsInvalidInput(mPresetNameLineEdit);
|
||||
@@ -1362,7 +1362,7 @@ namespace EMStudio
|
||||
}
|
||||
|
||||
// find the corresponding attribute
|
||||
MCore::Attribute* attribute = animGraphInstance->GetParameterValue(parameterIndex);
|
||||
MCore::Attribute* attribute = animGraphInstance->GetParameterValue(static_cast<uint32>(parameterIndex));
|
||||
|
||||
if (attribute->GetType() == MCore::AttributeFloat::TYPE_ID)
|
||||
{
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace MysticQt
|
||||
// iterate through the groups and save all actions for them
|
||||
for (const AZStd::unique_ptr<Group>& group : m_groups)
|
||||
{
|
||||
settings->beginGroup(QString::fromUtf8(group->GetName().data(), group->GetName().size()));
|
||||
settings->beginGroup(QString::fromUtf8(group->GetName().data(), static_cast<int>(group->GetName().size())));
|
||||
|
||||
// iterate through the actions and save them
|
||||
for (const AZStd::unique_ptr<Action>& action : group->GetActions())
|
||||
|
||||
@@ -873,7 +873,7 @@ namespace EMotionFX
|
||||
AZ_Warning("EmotionFX", false, "Invalid anim graph parameter name: %s", parameterName);
|
||||
return;
|
||||
}
|
||||
SetParameterFloat(parameterIndex.GetValue(), value);
|
||||
SetParameterFloat(static_cast<AZ::u32>(parameterIndex.GetValue()), value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -888,7 +888,7 @@ namespace EMotionFX
|
||||
AZ_Warning("EmotionFX", false, "Invalid anim graph parameter name: %s", parameterName);
|
||||
return;
|
||||
}
|
||||
SetParameterBool(parameterIndex.GetValue(), value);
|
||||
SetParameterBool(static_cast<AZ::u32>(parameterIndex.GetValue()), value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -903,7 +903,7 @@ namespace EMotionFX
|
||||
AZ_Warning("EmotionFX", false, "Invalid anim graph parameter name: %s", parameterName);
|
||||
return;
|
||||
}
|
||||
SetParameterString(parameterIndex.GetValue(), value);
|
||||
SetParameterString(static_cast<AZ::u32>(parameterIndex.GetValue()), value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -918,7 +918,7 @@ namespace EMotionFX
|
||||
AZ_Warning("EmotionFX", false, "Invalid anim graph parameter name: %s", parameterName);
|
||||
return;
|
||||
}
|
||||
SetParameterVector2(parameterIndex.GetValue(), value);
|
||||
SetParameterVector2(static_cast<AZ::u32>(parameterIndex.GetValue()), value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,7 +933,7 @@ namespace EMotionFX
|
||||
AZ_Warning("EmotionFX", false, "Invalid anim graph parameter name: %s", parameterName);
|
||||
return;
|
||||
}
|
||||
SetParameterVector3(parameterIndex.GetValue(), value);
|
||||
SetParameterVector3(static_cast<AZ::u32>(parameterIndex.GetValue()), value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -948,7 +948,7 @@ namespace EMotionFX
|
||||
AZ_Warning("EmotionFX", false, "Invalid anim graph parameter name: %s", parameterName);
|
||||
return;
|
||||
}
|
||||
SetParameterRotationEuler(parameterIndex.GetValue(), value);
|
||||
SetParameterRotationEuler(static_cast<AZ::u32>(parameterIndex.GetValue()), value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -963,7 +963,7 @@ namespace EMotionFX
|
||||
AZ_Warning("EmotionFX", false, "Invalid anim graph parameter name: %s", parameterName);
|
||||
return;
|
||||
}
|
||||
SetParameterRotation(parameterIndex.GetValue(), value);
|
||||
SetParameterRotation(static_cast<AZ::u32>(parameterIndex.GetValue()), value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1119,7 +1119,7 @@ namespace EMotionFX
|
||||
const AZ::Outcome<size_t> parameterIndex = m_animGraphInstance->FindParameterIndex(parameterName);
|
||||
if (parameterIndex.IsSuccess())
|
||||
{
|
||||
return GetParameterFloat(parameterIndex.GetValue());
|
||||
return GetParameterFloat(static_cast<AZ::u32>(parameterIndex.GetValue()));
|
||||
}
|
||||
}
|
||||
return 0.f;
|
||||
@@ -1133,7 +1133,7 @@ namespace EMotionFX
|
||||
const AZ::Outcome<size_t> parameterIndex = m_animGraphInstance->FindParameterIndex(parameterName);
|
||||
if (parameterIndex.IsSuccess())
|
||||
{
|
||||
return GetParameterBool(parameterIndex.GetValue());
|
||||
return GetParameterBool(static_cast<AZ::u32>(parameterIndex.GetValue()));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -1147,7 +1147,7 @@ namespace EMotionFX
|
||||
const AZ::Outcome<size_t> parameterIndex = m_animGraphInstance->FindParameterIndex(parameterName);
|
||||
if (parameterIndex.IsSuccess())
|
||||
{
|
||||
return GetParameterString(parameterIndex.GetValue());
|
||||
return GetParameterString(static_cast<AZ::u32>(parameterIndex.GetValue()));
|
||||
}
|
||||
}
|
||||
return AZStd::string();
|
||||
@@ -1161,7 +1161,7 @@ namespace EMotionFX
|
||||
const AZ::Outcome<size_t> parameterIndex = m_animGraphInstance->FindParameterIndex(parameterName);
|
||||
if (parameterIndex.IsSuccess())
|
||||
{
|
||||
return GetParameterVector2(parameterIndex.GetValue());
|
||||
return GetParameterVector2(static_cast<AZ::u32>(parameterIndex.GetValue()));
|
||||
}
|
||||
}
|
||||
return AZ::Vector2::CreateZero();
|
||||
@@ -1175,7 +1175,7 @@ namespace EMotionFX
|
||||
const AZ::Outcome<size_t> parameterIndex = m_animGraphInstance->FindParameterIndex(parameterName);
|
||||
if (parameterIndex.IsSuccess())
|
||||
{
|
||||
return GetParameterVector3(parameterIndex.GetValue());
|
||||
return GetParameterVector3(static_cast<AZ::u32>(parameterIndex.GetValue()));
|
||||
}
|
||||
}
|
||||
return AZ::Vector3::CreateZero();
|
||||
@@ -1189,7 +1189,7 @@ namespace EMotionFX
|
||||
const AZ::Outcome<size_t> parameterIndex = m_animGraphInstance->FindParameterIndex(parameterName);
|
||||
if (parameterIndex.IsSuccess())
|
||||
{
|
||||
return GetParameterRotationEuler(parameterIndex.GetValue());
|
||||
return GetParameterRotationEuler(static_cast<AZ::u32>(parameterIndex.GetValue()));
|
||||
}
|
||||
}
|
||||
return AZ::Vector3::CreateZero();
|
||||
@@ -1203,7 +1203,7 @@ namespace EMotionFX
|
||||
const AZ::Outcome<size_t> parameterIndex = m_animGraphInstance->FindParameterIndex(parameterName);
|
||||
if (parameterIndex.IsSuccess())
|
||||
{
|
||||
return GetParameterRotation(parameterIndex.GetValue());
|
||||
return GetParameterRotation(static_cast<AZ::u32>(parameterIndex.GetValue()));
|
||||
}
|
||||
}
|
||||
return AZ::Quaternion::CreateIdentity();
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace EMotionFX
|
||||
AnimGraphMotionNode* motionNode = aznew AnimGraphMotionNode();
|
||||
motionNode->SetName(AZStd::string::format("MotionNode%zu", i).c_str());
|
||||
m_blendTree->AddChildNode(motionNode);
|
||||
m_blend2Node->AddConnection(motionNode, AnimGraphMotionNode::PORTID_OUTPUT_POSE, i);
|
||||
m_blend2Node->AddConnection(motionNode, AnimGraphMotionNode::PORTID_OUTPUT_POSE, static_cast<uint16>(i));
|
||||
m_motionNodes.push_back(motionNode);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace EMotionFX
|
||||
AnimGraphMotionNode* motionNode = aznew AnimGraphMotionNode();
|
||||
motionNode->SetName(AZStd::string::format("MotionNode%zu", i).c_str());
|
||||
m_blendTree->AddChildNode(motionNode);
|
||||
m_blendNNode->AddConnection(motionNode, AnimGraphMotionNode::PORTID_OUTPUT_POSE, i);
|
||||
m_blendNNode->AddConnection(motionNode, AnimGraphMotionNode::PORTID_OUTPUT_POSE, static_cast<uint16>(i));
|
||||
m_motionNodes.push_back(motionNode);
|
||||
}
|
||||
m_blendNNode->UpdateParamWeights();
|
||||
|
||||
@@ -260,7 +260,7 @@ namespace EMotionFX
|
||||
GetEMotionFX().Update(0.0f);
|
||||
EXPECT_EQ(Transform::CreateIdentity(), GetOutputTransform());
|
||||
|
||||
static_cast<MCore::AttributeFloat*>(m_animGraphInstance->GetParameterValue(m_animGraph->FindParameterIndex(m_parameter).GetValue()))->SetValue(1.0f);
|
||||
static_cast<MCore::AttributeFloat*>(m_animGraphInstance->GetParameterValue(static_cast<uint32>(m_animGraph->FindParameterIndex(m_parameter).GetValue())))->SetValue(1.0f);
|
||||
|
||||
GetEMotionFX().Update(0.0f);
|
||||
EXPECT_EQ(Transform::CreateIdentity() * AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 0.0f, 0.0f)), GetOutputTransform());
|
||||
@@ -313,7 +313,7 @@ namespace EMotionFX
|
||||
|
||||
// Changing this one parameter value should change it through all 3
|
||||
// layers of reference nodes, down to the referenced Transform node
|
||||
static_cast<MCore::AttributeFloat*>(m_animGraphInstance->GetParameterValue(m_animGraph->FindParameterIndex(m_topLevelParameter).GetValue()))->SetValue(1.0f);
|
||||
static_cast<MCore::AttributeFloat*>(m_animGraphInstance->GetParameterValue(static_cast<uint32>(m_animGraph->FindParameterIndex(m_topLevelParameter).GetValue())))->SetValue(1.0f);
|
||||
|
||||
GetEMotionFX().Update(0.0f);
|
||||
EXPECT_EQ(Transform::CreateIdentity() * AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 0.0f, 0.0f)), GetOutputTransform());
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace EMotionFX
|
||||
TestInequality(defaultValueParameter->GetDefaultValue(), expectedValue);
|
||||
|
||||
AnimGraphInstance* animGraphInstance = animGraph->GetAnimGraphInstance(0);
|
||||
auto instanceValue = static_cast<AttributeT*>(animGraphInstance->GetParameterValue(animGraph->FindValueParameterIndex(valueParameter).GetValue()));
|
||||
auto instanceValue = static_cast<AttributeT*>(animGraphInstance->GetParameterValue(static_cast<uint32>(animGraph->FindValueParameterIndex(valueParameter).GetValue())));
|
||||
ASSERT_EQ(instanceValue->GetType(), AttributeT::TYPE_ID);
|
||||
|
||||
// Set the parameter's current value
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace EMotionFX
|
||||
motionSetPlugin->SetSelectedSet(motionSet);
|
||||
|
||||
// It should be empty at the moment.
|
||||
int numMotions = motionSet->GetNumMotionEntries();
|
||||
int numMotions = static_cast<int>(motionSet->GetNumMotionEntries());
|
||||
EXPECT_EQ(numMotions, 0);
|
||||
|
||||
// Find the action to add a motion to the set and press it.
|
||||
@@ -65,7 +65,7 @@ namespace EMotionFX
|
||||
QTest::mouseClick(addMotionButton, Qt::LeftButton);
|
||||
|
||||
// There should now be a motion.
|
||||
int numMotionsAfterCreate = motionSet->GetNumMotionEntries();
|
||||
int numMotionsAfterCreate = static_cast<int>(motionSet->GetNumMotionEntries());
|
||||
ASSERT_EQ(numMotionsAfterCreate, 1);
|
||||
|
||||
AZStd::unordered_map<AZStd::string, MotionSet::MotionEntry*> motions = motionSet->GetMotionEntries();
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace EMotionFX
|
||||
QTest::mouseClick(createButton, Qt::LeftButton);
|
||||
|
||||
// Check we only have the one Parameter
|
||||
int numParameters = newGraph->GetNumParameters();
|
||||
int numParameters = static_cast<int>(newGraph->GetNumParameters());
|
||||
EXPECT_EQ(numParameters, 1) << "Not just 1 parameter";
|
||||
|
||||
const RangedValueParameter<float, FloatParameter>* parameter = reinterpret_cast<const RangedValueParameter<float, FloatParameter>* >(newGraph->FindValueParameter(0));
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace EMotionFX
|
||||
motionSetPlugin->SetSelectedSet(motionSet);
|
||||
|
||||
// It should be empty at the moment.
|
||||
const int numMotions = motionSet->GetNumMotionEntries();
|
||||
const int numMotions = static_cast<int>(motionSet->GetNumMotionEntries());
|
||||
EXPECT_EQ(numMotions, 0);
|
||||
|
||||
// Find the action to add a motion to the set and press it.
|
||||
@@ -68,7 +68,7 @@ namespace EMotionFX
|
||||
QTest::mouseClick(addMotionButton, Qt::LeftButton);
|
||||
|
||||
// There should now be a motion.
|
||||
const int numMotionsAfterCreate = motionSet->GetNumMotionEntries();
|
||||
const int numMotionsAfterCreate = static_cast<int>(motionSet->GetNumMotionEntries());
|
||||
ASSERT_EQ(numMotionsAfterCreate, 1);
|
||||
|
||||
AZStd::unordered_map<AZStd::string, MotionSet::MotionEntry*> motions = motionSet->GetMotionEntries();
|
||||
@@ -140,7 +140,7 @@ namespace EMotionFX
|
||||
motionSetPlugin->SetSelectedSet(motionSet);
|
||||
|
||||
// It should be empty at the moment.
|
||||
const int numMotions = motionSet->GetNumMotionEntries();
|
||||
const int numMotions = static_cast<int>(motionSet->GetNumMotionEntries());
|
||||
EXPECT_EQ(numMotions, 0);
|
||||
|
||||
// Find the action to add a motion to the set and press it twice.
|
||||
@@ -150,7 +150,7 @@ namespace EMotionFX
|
||||
QTest::mouseClick(addMotionButton, Qt::LeftButton);
|
||||
|
||||
// There should now be two motion.
|
||||
const int numMotionsAfterCreate = motionSet->GetNumMotionEntries();
|
||||
const int numMotionsAfterCreate = static_cast<int>(motionSet->GetNumMotionEntries());
|
||||
ASSERT_EQ(numMotionsAfterCreate, 2);
|
||||
|
||||
AZStd::unordered_map<AZStd::string, MotionSet::MotionEntry*> motions = motionSet->GetMotionEntries();
|
||||
|
||||
Reference in New Issue
Block a user