diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-16 11:59:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-16 11:59:22 +0400 |
commit | f227c4a064d96909243b4a60a7f6c544f521817a (patch) | |
tree | fdfe11ef2c4a718f1b703653098ce45c6a5f4db9 /source/blender | |
parent | 3ede710a3c6b8c5bd10136e468019091110006ac (diff) |
fix [#27675] Bones shift out of place when leaving edit mode
- float precision issue, details commented in the source.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index fd25ebe266f..0b31e51d62e 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1343,8 +1343,12 @@ void vec_roll_to_mat3(float *vec, float roll, float mat[][3]) cross_v3_v3v3(axis,target,nor); /* was 0.0000000000001, caused bug [#23954], smaller values give unstable - * roll when toggling editmode */ - if (dot_v3v3(axis,axis) > 0.00001f) { + * roll when toggling editmode. + * + * was 0.00001, causes bug [#27675], with 0.00000495, + * so a value inbetween these is needed. + */ + if (dot_v3v3(axis,axis) > 0.000001f) { /* if nor is *not* a multiple of target ... */ normalize_v3(axis); |