Spline IK Bugfix:
Spline IK now takes curve-object transforms into account when the 'Chain Offset' option is not enabled, since the intention of that feature is to allow a chain of bones following the shape of a curve to be placed anywhere in the scene.
This commit is contained in:
@@ -1892,6 +1892,12 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
|
||||
|
||||
/* tail endpoint */
|
||||
if ( where_on_path(ikData->tar, tree->points[index], vec, dir, NULL, &rad) ) {
|
||||
/* apply curve's object-mode transforms to the position
|
||||
* unless the option to allow curve to be positioned elsewhere is activated (i.e. no root)
|
||||
*/
|
||||
if ((ikData->flag & CONSTRAINT_SPLINEIK_NO_ROOT) == 0)
|
||||
mul_m4_v3(ikData->tar->obmat, vec);
|
||||
|
||||
/* convert the position to pose-space, then store it */
|
||||
mul_m4_v3(ob->imat, vec);
|
||||
interp_v3_v3v3(poseTail, pchan->pose_tail, vec, tailBlendFac);
|
||||
@@ -1902,6 +1908,12 @@ static void splineik_evaluate_bone(tSplineIK_Tree *tree, Scene *scene, Object *o
|
||||
|
||||
/* head endpoint */
|
||||
if ( where_on_path(ikData->tar, tree->points[index+1], vec, dir, NULL, &rad) ) {
|
||||
/* apply curve's object-mode transforms to the position
|
||||
* unless the option to allow curve to be positioned elsewhere is activated (i.e. no root)
|
||||
*/
|
||||
if ((ikData->flag & CONSTRAINT_SPLINEIK_NO_ROOT) == 0)
|
||||
mul_m4_v3(ikData->tar->obmat, vec);
|
||||
|
||||
/* store the position, and convert it to pose space */
|
||||
mul_m4_v3(ob->imat, vec);
|
||||
VECCOPY(poseHead, vec);
|
||||
|
Reference in New Issue
Block a user