Revision: 16832 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16832 Author: theeth Date: 2008-09-29 22:21:46 +0200 (Mon, 29 Sep 2008)
Log Message: ----------- fix bug with adjust retarget and control bones Modified Paths: -------------- branches/harmonic-skeleton/source/blender/src/autoarmature.c Modified: branches/harmonic-skeleton/source/blender/src/autoarmature.c =================================================================== --- branches/harmonic-skeleton/source/blender/src/autoarmature.c 2008-09-29 20:13:40 UTC (rev 16831) +++ branches/harmonic-skeleton/source/blender/src/autoarmature.c 2008-09-29 20:21:46 UTC (rev 16832) @@ -159,6 +159,7 @@ typedef struct RigControl { struct RigControl *next, *prev; + float head[3], tail[3]; EditBone *bone; EditBone *link; float up_axis[3]; @@ -471,6 +472,8 @@ { RigControl *ctrl = newRigControl(rg); ctrl->bone = bone; + VECCOPY(ctrl->head, bone->head); + VECCOPY(ctrl->tail, bone->tail); getEditBoneRollUpAxis(bone, bone->roll, ctrl->up_axis); BLI_ghash_insert(rg->controls_map, bone->name, ctrl); @@ -1473,7 +1476,7 @@ RigControl *ctrl_child; float parent_offset[3], tail_offset[3]; - VecSubf(tail_offset, ctrl->bone->tail, ctrl->bone->head); + VecSubf(tail_offset, ctrl->tail, ctrl->head); VecMulf(tail_offset, resize); VECCOPY(parent_offset, ctrl->offset); @@ -1509,7 +1512,7 @@ bone = edge->bone; - VecSubf(v1, bone->tail, bone->head); + VecSubf(v1, edge->tail, edge->head); VecSubf(v2, vec1, vec0); l1 = Normalize(v1); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs