From f703a798f4a66166687a0d5252a6e389bd1d752c Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Wed, 10 Jul 2019 16:27:59 -0700 Subject: [PATCH] customize error rate for bind pose --- code/FBX/FBXExporter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index dd34e135f..347025a79 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -68,6 +68,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include //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);