diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-02-06 01:03:19 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-02-06 01:03:19 +0300 |
commit | 29a6465ed4e08e4bdf1bc53bace2be1774d6fd38 (patch) | |
tree | e5e8a58649894056d789698998859af41bead58d /source | |
parent | 5affc83eb2ab59b5946a34a7ed40c014861599c6 (diff) |
Bugfix #20971: IK Joints Inexplicably Stiff In Recent Blender 2.5 Builds
- IK-Solver interfaces were still converting units from degrees to radians. Made these all use radians now.
- Tried to fix the DOF limits drawing. This is still not totally functional again yet, but at least there are visible lines now.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/drawarmature.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index fd6d2d36b63..9e5d20fca7f 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -1479,8 +1479,8 @@ static void draw_pose_dofs(Object *ob) float amin[3], amax[3]; for (i=0; i<3; i++) { - amin[i]= (float)sin(pchan->limitmin[i]*M_PI/360.0); - amax[i]= (float)sin(pchan->limitmax[i]*M_PI/360.0); + amin[i]= (float)sin(pchan->limitmin[i]); + amax[i]= (float)sin(pchan->limitmax[i]); } glScalef(1.0f, -1.0f, 1.0f); @@ -1498,7 +1498,7 @@ static void draw_pose_dofs(Object *ob) /* arcs */ if (pchan->ikflag & BONE_IK_ZLIMIT) { - theta= 0.5f*(pchan->limitmin[2]+pchan->limitmax[2]); + theta= 0.5f*(pchan->limitmin[2]+pchan->limitmax[2]) * (float)(180.0f/M_PI); glRotatef(theta, 0.0f, 0.0f, 1.0f); glColor3ub(50, 50, 255); // blue, Z axis limit @@ -1506,7 +1506,7 @@ static void draw_pose_dofs(Object *ob) for (a=-16; a<=16; a++) { float fac= ((float)a)/16.0f; - phi= fac * (float)(M_PI/360.0f) * (pchan->limitmax[2] - pchan->limitmin[2]); + phi= fac * (pchan->limitmax[2] - pchan->limitmin[2]); i= (a == -16) ? 0 : 1; corner[i][0]= (float)sin(phi); @@ -1520,14 +1520,14 @@ static void draw_pose_dofs(Object *ob) } if (pchan->ikflag & BONE_IK_XLIMIT) { - theta= 0.5f * (pchan->limitmin[0] + pchan->limitmax[0]); + theta= 0.5f * (pchan->limitmin[0] + pchan->limitmax[0]) * (float)(180.0f/M_PI); glRotatef(theta, 1.0f, 0.0f, 0.0f); glColor3ub(255, 50, 50); // Red, X axis limit glBegin(GL_LINE_STRIP); for (a=-16; a<=16; a++) { float fac= ((float)a)/16.0f; - phi= (float)(0.5*M_PI) + fac * (float)(M_PI/360.0f) * (pchan->limitmax[0] - pchan->limitmin[0]); + phi= (float)(0.5*M_PI) + fac * (pchan->limitmax[0] - pchan->limitmin[0]); i= (a == -16) ? 2 : 3; corner[i][0]= 0.0f; |