Ver código fonte

fix no preservePivots bug

chenmou.cm 5 anos atrás
pai
commit
7c3fd351d3
1 arquivos alterados com 6 adições e 4 exclusões
  1. 6 4
      code/FBX/FBXConverter.cpp

+ 6 - 4
code/FBX/FBXConverter.cpp

@@ -883,10 +883,12 @@ namespace Assimp {
             // name passed to the method is already unique
             nd->mName.Set(name);
 
-            for (const auto &transform : chain) {
-                nd->mTransformation = nd->mTransformation * transform;
-            }
-            return false;
+            // for (const auto &transform : chain) {
+			// skip inverse chain for no preservePivots
+			for (unsigned int i = TransformationComp_Translation; i < TransformationComp_MAXIMUM; i++) {
+				nd->mTransformation = nd->mTransformation * chain[i];
+			}
+			return false;
         }
 
         void FBXConverter::SetupNodeMetadata(const Model& model, aiNode& nd)