diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-09-21 02:48:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-09-21 02:59:50 +0300 |
commit | 726727191ab66fb4a02d4d0bd12b03d5f73f1c5f (patch) | |
tree | e42188a534a1ee798282756f35f7c82cdd7bd358 /intern/iksolver | |
parent | 0b714abacc5aa6d21929ffb771068d4cebb1d4df (diff) |
Fix T43715: IK pole target + stretch not working for a single bone chain.
Diffstat (limited to 'intern/iksolver')
-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); |