customize error rate for bind pose

pull/2543/head
thomasbiang 2019-07-10 16:27:59 -07:00
parent 6beed14e35
commit f703a798f4
1 changed files with 6 additions and 1 deletions

View File

@ -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);