diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-09-21 02:48:37 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-09-23 17:02:24 +0300 |
commit | 869c3344c92cf29d7081f64e3d0f45d66c59cf0a (patch) | |
tree | d66e739c66cc5aeb1845da7ed25e2410517109f0 | |
parent | 78f4e22dc3c700dec3917508a8f94475f4ab1c01 (diff) |
Fix T43715: IK pole target + stretch not working for a single bone chain.
-rw-r--r-- | intern/iksolver/intern/IK_Solver.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/iksolver/intern/IK_Solver.cpp b/intern/iksolver/intern/IK_Solver.cpp index 65ea4d64ab1..eb18cde3356 100644 --- a/intern/iksolver/intern/IK_Solver.cpp +++ b/intern/iksolver/intern/IK_Solver.cpp @@ -292,6 +292,7 @@ void IK_SolverAddGoal(IK_Solver *solver, IK_Segment *tip, float goal[3], float w IK_QSolver *qsolver = (IK_QSolver *)solver; IK_QSegment *qtip = (IK_QSegment *)tip; + // in case of composite segment the second segment is the tip if (qtip->Composite()) qtip = qtip->Composite(); @@ -310,6 +311,7 @@ void IK_SolverAddGoalOrientation(IK_Solver *solver, IK_Segment *tip, float goal[ IK_QSolver *qsolver = (IK_QSolver *)solver; IK_QSegment *qtip = (IK_QSegment *)tip; + // in case of composite segment the second segment is the tip if (qtip->Composite()) qtip = qtip->Composite(); @@ -331,6 +333,10 @@ void IK_SolverSetPoleVectorConstraint(IK_Solver *solver, IK_Segment *tip, float IK_QSolver *qsolver = (IK_QSolver *)solver; IK_QSegment *qtip = (IK_QSegment *)tip; + // in case of composite segment the second segment is the tip + if (qtip->Composite()) + qtip = qtip->Composite(); + MT_Vector3 qgoal(goal); MT_Vector3 qpolegoal(polegoal); |