diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-05-03 10:49:29 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-05-03 10:52:22 +0400 |
commit | 39dc3bce30215a7fbf130912b6025cb258f087e6 (patch) | |
tree | 1327e135b9e00e989efe1042b57be9b61f7082a6 /source/blender/blenkernel/intern/armature.c | |
parent | 35a9a7d396cd416b036e24d76171dfaf5758737e (diff) |
Fix T40001: Opening a 2.66 blend file in 2.7, a bone appear "rolled but not rolled".
Looks like some sign was lost in that complex matrix algebra (always be wary of squared values!).
Diffstat (limited to 'source/blender/blenkernel/intern/armature.c')
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index d030de0d7ec..fda252e81fd 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1522,7 +1522,7 @@ void vec_roll_to_mat3(const float vec[3], const float roll, float mat[3][3]) else { /* If nor is too close to -Y, apply the special case. */ theta = nor[0] * nor[0] + nor[2] * nor[2]; - bMatrix[0][0] = (nor[0] + nor[2]) * (nor[0] - nor[2]) / theta; + bMatrix[0][0] = (nor[0] + nor[2]) * (nor[0] - nor[2]) / -theta; bMatrix[2][2] = -bMatrix[0][0]; bMatrix[2][0] = bMatrix[0][2] = 2.0f * nor[0] * nor[2] / theta; } |