[Bf-extensions-cvs] [0e4f0c2] master: Fix issue in similar_values_iter() helper.

Bastien Montagne noreply at git.blender.org
Fri Jul 11 19:44:59 CEST 2014


Commit: 0e4f0c2ee86fc3137bca32c365719253dc365e04
Author: Bastien Montagne
Date:   Fri Jul 11 16:29:54 2014 +0200
https://developer.blender.org/rBA0e4f0c2ee86fc3137bca32c365719253dc365e04

Fix issue in similar_values_iter() helper.

===================================================================

M	io_scene_fbx/fbx_utils.py

===================================================================

diff --git a/io_scene_fbx/fbx_utils.py b/io_scene_fbx/fbx_utils.py
index 9b3f638..2f203dd 100644
--- a/io_scene_fbx/fbx_utils.py
+++ b/io_scene_fbx/fbx_utils.py
@@ -202,7 +202,7 @@ def similar_values_iter(v1, v2, e=1e-6):
     if v1 == v2:
         return True
     for v1, v2 in zip(v1, v2):
-        if (abs(v1 - v2) / max(abs(v1), abs(v2))) > e:
+        if (v1 != v2) and ((abs(v1 - v2) / max(abs(v1), abs(v2))) > e):
             return False
     return True



More information about the Bf-extensions-cvs mailing list