fixed bug

This commit is contained in:
Perfare 2019-07-27 18:01:57 +08:00
parent e9e8390bbc
commit 1cf59e8d67

View File

@ -539,23 +539,20 @@ namespace AssetStudio
for (int j = 0; j < boneList->Count; j++) for (int j = 0; j < boneList->Count; j++)
{ {
FbxCluster* pCluster = pClusterArray->GetAt(j); FbxCluster* pCluster = pClusterArray->GetAt(j);
if (pCluster->GetControlPointIndicesCount() > 0) auto boneMatrix = boneList[j]->Matrix;
FbxAMatrix lBoneMatrix;
for (int m = 0; m < 4; m++)
{ {
auto boneMatrix = boneList[j]->Matrix; for (int n = 0; n < 4; n++)
FbxAMatrix lBoneMatrix;
for (int m = 0; m < 4; m++)
{ {
for (int n = 0; n < 4; n++) lBoneMatrix.mData[m][n] = boneMatrix[m, n];
{
lBoneMatrix.mData[m][n] = boneMatrix[m, n];
}
} }
pCluster->SetTransformMatrix(lMeshMatrix);
pCluster->SetTransformLinkMatrix(lMeshMatrix * lBoneMatrix.Inverse());
pSkin->AddCluster(pCluster);
} }
pCluster->SetTransformMatrix(lMeshMatrix);
pCluster->SetTransformLinkMatrix(lMeshMatrix * lBoneMatrix.Inverse());
pSkin->AddCluster(pCluster);
} }
if (pSkin->GetClusterCount() > 0) if (pSkin->GetClusterCount() > 0)