Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-02-28 18:42:25 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-04-06 17:04:31 +0300
commit8fe3f475961fe260f832d4869e19e9fed9db4c42 (patch)
tree3a0f3378348ceabda9f9bf7c6fc6e943417271c5
parenta9504580b35ec305931e5c5cb706c5f929f132fd (diff)
Alembic: more lenient check on absence of sheer & homogeneous scaling
Checking precise values of floats is not a good idea.
-rw-r--r--source/blender/alembic/intern/abc_util.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/alembic/intern/abc_util.cc b/source/blender/alembic/intern/abc_util.cc
index 194f4c276d1..2274a50ad7d 100644
--- a/source/blender/alembic/intern/abc_util.cc
+++ b/source/blender/alembic/intern/abc_util.cc
@@ -178,10 +178,10 @@ void copy_m44_axis_swap(float dst_mat[4][4], float src_mat[4][4], AbcAxisSwapMod
unit_m4(dst_scale_mat);
/* We assume there is no sheer component and no homogeneous scaling component. */
- BLI_assert(src_mat[0][3] == 0.0);
- BLI_assert(src_mat[1][3] == 0.0);
- BLI_assert(src_mat[2][3] == 0.0);
- BLI_assert(src_mat[3][3] == 1.0);
+ BLI_assert(fabs(src_mat[0][3]) < 2 * FLT_EPSILON);
+ BLI_assert(fabs(src_mat[1][3]) < 2 * FLT_EPSILON);
+ BLI_assert(fabs(src_mat[2][3]) < 2 * FLT_EPSILON);
+ BLI_assert(fabs(src_mat[3][3] - 1.0f) < 2 * FLT_EPSILON);
/* Extract translation, rotation, and scale form matrix. */
mat4_to_loc_rot_size(src_trans, src_rot, src_scale, src_mat);