Explorar el Código

Fix: Add "preservePivots" condition when importing FBX animation (#6115)

Co-authored-by: Kim Kulling <[email protected]>
NSG hace 3 meses
padre
commit
c4515f53ca
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      code/AssetLib/FBX/FBXConverter.cpp

+ 1 - 1
code/AssetLib/FBX/FBXConverter.cpp

@@ -2958,7 +2958,7 @@ void FBXConverter::GenerateNodeAnimations(std::vector<aiNodeAnim *> &node_anims,
     // be invoked _later_ (animations come first). If this node has only rotation,
     // scaling and translation _and_ there are no animated other components either,
     // we can use a single node and also a single node animation channel.
-    if( !has_complex && !NeedsComplexTransformationChain(target)) {
+    if (!doc.Settings().preservePivots || (!has_complex && !NeedsComplexTransformationChain(target))) {
         aiNodeAnim* const nd = GenerateSimpleNodeAnim(fixed_name, target, chain,
                 node_property_map.end(),
                 start, stop,