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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-04-16 20:20:27 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-04-16 20:20:27 +0400
commitee387c6addb2a6c92b48525b0ee5b3b734430002 (patch)
tree09af636c76fa9fed17e9de184d49ecff42efede7 /source/blender/blenkernel
parenta7120b97307d60a2c8bc4cf00f62a960b633e86d (diff)
Fix T39750: Bones disappearing with strange transforms.
Fixed this issue and another similar one, and some minor optimizations.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/armature.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index a8f533b8f55..b2b94992cb3 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1488,7 +1488,7 @@ void vec_roll_to_mat3(const float vec[3], const float roll, float mat[3][3])
normalize_v3_v3(nor, vec);
- theta = 1 + nor[1];
+ theta = 1.0f + nor[1];
/* With old algo, 1.0e-13f caused T23954 and T31333, 1.0e-6f caused T27675 and T30438,
* so using 1.0e-9f as best compromise.
@@ -1496,7 +1496,7 @@ void vec_roll_to_mat3(const float vec[3], const float roll, float mat[3][3])
* New algo is supposed much more precise, since less complex computations are performed,
* but it uses two different threshold values...
*/
- if (theta > 1.0e-9f) {
+ if ((nor[0] || nor[2]) && theta > 1.0e-9f) {
/* nor is *not* -Y.
* We got these values for free... so be happy with it... ;)
*/