diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index c1d24bf5deb..f567e3dde6e 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1170,8 +1170,9 @@ static void execute_posetree(Object *ob, PoseTree *tree) /* bone offset */ if (pchan->parent && (a > 0)) - VecCopyf(start, bone->head); + VecSubf(start, pchan->pose_head, pchan->parent->pose_tail); else + /* only root bone (a = 0) has no parent */ start[0]= start[1]= start[2]= 0.0f; /* change length based on bone size */ diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c index 112731b5814..e35e45ab626 100644 --- a/source/blender/src/drawarmature.c +++ b/source/blender/src/drawarmature.c @@ -1105,10 +1105,10 @@ static void bgl_sphere_project(float ax, float az) float dir[3], sine, q3; sine= 1.0f-ax*ax-az*az; - q3= 2.0*sqrt((sine < 0.0f)? 0.0f: sine); + q3= (sine < 0.0f)? 0.0f: 2.0f*sqrt(sine); dir[0]= -az*q3; - dir[1]= 1.0-2.0*sine; + dir[1]= 1.0f-2.0f*sine; dir[2]= ax*q3; glVertex3fv(dir); @@ -1134,11 +1134,11 @@ static void draw_dof_ellipse(float ax, float az) glColor4ub(70, 70, 70, 50); glBegin(GL_QUADS); - pz= 0.0; + pz= 0.0f; for(i=1; iflag & BONE_HIDDEN_P)) { if(bone->flag & BONE_SELECTED) { if(pose_channel_in_IK_chain(ob, pchan)) { - float corner[4][3], mat[4][4]; + float corner[4][3], posetrans[3], mat[4][4]; float phi=0.0f, theta=0.0f, scale; int a, i; - + /* in parent-bone pose, but own restspace */ glPushMatrix(); + + VECCOPY(posetrans, pchan->pose_mat[3]); + glTranslatef(posetrans[0], posetrans[1], posetrans[2]); + if(pchan->parent) { - glMultMatrixf(pchan->parent->pose_mat); - glTranslatef(0.0f, bone->parent->length, 0.0f); + Mat4CpyMat4(mat, pchan->parent->pose_mat); + mat[3][0]= mat[3][1]= mat[3][2]= 0.0f; + glMultMatrixf(mat); } - glTranslatef(bone->head[0], bone->head[1], bone->head[2]); + Mat4CpyMat3(mat, pchan->bone->bone_mat); glMultMatrixf(mat); diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index 1a9e4b9ac21..787b6a6471a 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -487,6 +487,8 @@ void calculate_uv_map(unsigned short mapmode) BIF_undo_push("UV calculation"); + object_uvs_changed(OBACT); + allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWIMAGE, 0); } diff --git a/source/blender/src/unwrapper.c b/source/blender/src/unwrapper.c index 4747a26825a..c1bf0d3fa3f 100644 --- a/source/blender/src/unwrapper.c +++ b/source/blender/src/unwrapper.c @@ -1158,12 +1158,12 @@ void unwrap_lscm(void) BIF_undo_push("UV lscm unwrap"); + object_uvs_changed(OBACT); + allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWIMAGE, 0); } - - /* Set tface seams based on edge data, uses hash table to find seam edges. */ void set_seamtface()