From caebbb264c6f200ac7e8d330071076eaa6a543b3 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 23 Mar 2012 09:18:00 +0000 Subject: Fix for [#30438] x=zero not accepted for a bone tail. In fact, problem was in vec_roll_to_mat3(), which has to detect when the bone is aligned with its Y axis, using a threshold. This one have been raised to quite a high value due to bug [#23954], then lowered a bit due to [#27675] (which is imho in fine the same problem as 30438). Reset it to its org value (very low 1e-13), as testing file given with firt bug did not show any problem anymore... So now, instead of 1/1000 of bone length from Y axis, we have about 3.25*10-7... Only (hardly) noticeable at max zoom level in 3D view. --- source/blender/blenkernel/intern/armature.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/armature.c') diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 09fd3199915..0f3e27a9b6e 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1513,8 +1513,11 @@ void vec_roll_to_mat3(const float vec[3], const float roll, float mat[][3]) * * was 0.00001, causes bug [#27675], with 0.00000495, * so a value inbetween these is needed. + * + * was 0.000001, causes bug [#30438] (which is same as [#27675, imho). + * Reseting it to org value seems to cause no more [#23954]... */ - if (dot_v3v3(axis,axis) > 0.000001f) { + if (dot_v3v3(axis,axis) > 1.0e-13f) { /* if nor is *not* a multiple of target ... */ normalize_v3(axis); -- cgit v1.2.3