Integrating github/staging through commit ab87ed9

This commit is contained in:
alexpete
2021-04-09 11:27:37 -07:00
parent ae62a97894
commit 1044dc3da1
1582 changed files with 29374 additions and 519051 deletions
@@ -507,7 +507,6 @@ namespace AZ
return Events::ProcessingResult::Ignored;
}
Events::ProcessingResultCombiner combinedAnimationResult;
aiNode* currentNode = context.m_sourceNode.GetAssImpNode();
// In:
// Key index
@@ -106,10 +106,6 @@ namespace AZ
RenamedNodesMap::SanitizeNodeName(nodeName, context.m_scene.GetGraph(), context.m_currentGraphPosition, "BlendShape");
AZ_TraceContext("Blend shape name", nodeName);
int firstMeshVertexIndex = -1;
int previousMeshVertexIndex = -1;
int verticesInMeshFace = 0;
AZStd::bitset<SceneData::GraphData::BlendShapeData::MaxNumUVSets> uvSetUsedFlags;
for (AZ::u8 uvSetIndex = 0; uvSetIndex < SceneData::GraphData::BlendShapeData::MaxNumUVSets; ++uvSetIndex)
{
@@ -131,16 +127,17 @@ namespace AZ
context.m_sourceSceneSystem.SwapVec3ForUpAxis(vertex);
context.m_sourceSceneSystem.ConvertUnit(vertex);
blendShapeData->AddPosition(vertex);
blendShapeData->SetVertexIndexToControlPointIndexMap(vertIdx, vertIdx);
// Add normals
AZ::Vector3 normal;
if (aiAnimMesh->HasNormals())
{
normal = AssImpSDKWrapper::AssImpTypeConverter::ToVector3(aiAnimMesh->mNormals[vertIdx]);
AZ::Vector3 normal(AssImpSDKWrapper::AssImpTypeConverter::ToVector3(aiAnimMesh->mNormals[vertIdx]));
context.m_sourceSceneSystem.SwapVec3ForUpAxis(normal);
normal.NormalizeSafe();
blendShapeData->AddNormal(normal);
}
blendShapeData->AddVertex(vertex, normal);
blendShapeData->SetVertexIndexToControlPointIndexMap(vertIdx, vertIdx);
// Add tangents and bitangents
if (aiAnimMesh->HasTangentsAndBitangents())
@@ -64,7 +64,6 @@ namespace AZ
return meshDataResult.GetError();
}
const SceneData::GraphData::MeshData* const parentMeshData(meshDataResult.GetValue());
int parentMeshIndex = parentMeshData->GetSdkMeshIndex();
size_t vertexCount = parentMeshData->GetVertexCount();
@@ -144,7 +144,6 @@ namespace AZ
}
blendShapeIndex++;
int blendShapeChannelCount = pDeformer->GetBlendShapeChannelCount();
int stackCount = context.m_sourceScene.GetAnimationStackCount();
auto animStackWrapper = context.m_sourceScene.GetAnimationStackAt(0);
const FbxSDKWrapper::FbxTimeWrapper startTime = animStackWrapper->GetLocalTimeSpan().GetStartTime();
@@ -248,7 +248,8 @@ namespace AZ
sceneSystem.SwapVec3ForUpAxis(meshVertexNormal);
meshVertexNormal.Normalize();
blendShape->AddVertex(meshVertexPosition, meshVertexNormal);
blendShape->AddPosition(meshVertexPosition);
blendShape->AddNormal(meshVertexNormal);
// Add face
{