diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 7fb3f9a260b..7a9224044f0 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -873,7 +873,8 @@ void vec_roll_to_mat3(float *vec, float roll, float mat[][3]) if (Inpf(axis,axis) > 0.0000000000001) { /* if nor is *not* a multiple of target ... */ Normalise (axis); - theta= NormalizedVecAngle2(target, nor); + theta=(float) acos (Inpf (target,nor)); + // theta= NormalizedVecAngle2(target, nor); /* Make Bone matrix*/ VecRotToMat3(axis, theta, bMatrix); diff --git a/source/blender/blenkernel/intern/node_composite.c b/source/blender/blenkernel/intern/node_composite.c index 58632df0c8c..42832f83294 100644 --- a/source/blender/blenkernel/intern/node_composite.c +++ b/source/blender/blenkernel/intern/node_composite.c @@ -3799,6 +3799,7 @@ static void do_chroma_key(bNode *node, float *out, float *in) break; } default: + x= z= 0.0f; break; } diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index eeb1dca76a7..03ef75b8188 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -154,7 +154,7 @@ void make_boneList(ListBase* list, ListBase *bones, EditBone *parent) Mat3Inv(imat, postmat); Mat3MulMat3(difmat, imat, premat); - eBone->roll = atan2(difmat[2][0], difmat[2][2]); + eBone->roll = atan(difmat[2][0]/difmat[2][2]); if (difmat[0][0]<0.0) eBone->roll +=M_PI; /* rest of stuff copy */ @@ -216,7 +216,7 @@ static void fix_bonelist_roll (ListBase *bonelist, ListBase *editbonelist) printmatrix4 ("difmat", difmat); printf ("Roll = %f\n", (-atan2(difmat[2][0], difmat[2][2]) * (180.0/M_PI))); #endif - curBone->roll = -atan2(difmat[2][0], difmat[2][2]); + curBone->roll = -atan(difmat[2][0]/difmat[2][2]); if (difmat[0][0]<0.0) curBone->roll +=M_PI; /* and set restposition again */ @@ -429,7 +429,7 @@ int join_armature(void) Mat4Invert (imat, premat); Mat4MulMat4 (difmat, postmat, imat); - curbone->roll -=atan2(difmat[2][0], difmat[2][2]); + curbone->roll -=atan(difmat[2][0]/difmat[2][2]); if (difmat[0][0]<0) curbone->roll +=M_PI; @@ -1129,7 +1129,7 @@ void auto_align_armature(void) Mat3Inv(imat, targetmat); Mat3MulMat3(diffmat, imat, curmat); - ebone->roll = atan2(diffmat[2][0], diffmat[2][2]); + ebone->roll = atan(diffmat[2][0]/diffmat[2][2]); } } }