feat: 动画äix: animation cut problem

This commit is contained in:
luzhuang 2023-06-08 07:50:44 +00:00
parent 9cfd44bec9
commit 0068506cfe
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -824,7 +824,7 @@ static void ReadAnimations(RawModel& raw, FbxScene* pScene, const GltfOptions& o
size_t totalSizeInBytes = 0; size_t totalSizeInBytes = 0;
const int nodeCount = pScene->GetNodeCount(); const int nodeCount = pScene->GetNodeCount();
for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) { for (int nodeIndex = 1; nodeIndex < nodeCount; nodeIndex++) {
FbxNode* pNode = pScene->GetNode(nodeIndex); FbxNode* pNode = pScene->GetNode(nodeIndex);
const FbxAMatrix baseTransform = pNode->EvaluateLocalTransform(); const FbxAMatrix baseTransform = pNode->EvaluateLocalTransform();
const FbxVector4 baseTranslation = baseTransform.GetT(); const FbxVector4 baseTranslation = baseTransform.GetT();
@ -937,7 +937,7 @@ static void ReadAnimations(RawModel& raw, FbxScene* pScene, const GltfOptions& o
} }
} }
if (hasTranslation || hasRotation || hasScale || hasMorphs) { if (!optAnimation || hasTranslation || hasRotation || hasScale || hasMorphs) {
if (optAnimation) { if (optAnimation) {
if (!hasTranslation) { if (!hasTranslation) {
channel.translations.clear(); channel.translations.clear();