Просмотр исходного кода

customize error rate for bind pose

thomasbiang 6 лет назад
Родитель
Сommit
f703a798f4
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      code/FBX/FBXExporter.cpp

+ 6 - 1
code/FBX/FBXExporter.cpp

@@ -68,6 +68,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <array>
 #include <unordered_set>
 
+#include <iostream> //wangyi
+
 // RESOURCES:
 // https://code.blender.org/2013/08/fbx-binary-file-format-specification/
 // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure
@@ -1824,7 +1826,10 @@ void FBXExporter::WriteObjects ()
 
             // this should be the same as the bone's mOffsetMatrix.
             // if it's not the same, the skeleton isn't in the bind pose.
-            const float epsilon = 1e-4f; // some error is to be expected
+            float epsilon = 1e-4f; // some error is to be expected
+#ifdef ASSIMP_CUSTOM_BINDPOSE_ERR
+            epsilon = ASSIMP_CUSTOM_BINDPOSE_ERR;
+#endif
             bool bone_xform_okay = true;
             if (b && ! tr.Equal(b->mOffsetMatrix, epsilon)) {
                 not_in_bind_pose.insert(b);