[Bf-blender-cvs] [7267271] master: Fix T43715: IK pole target + stretch not working for a single bone chain.
Brecht Van Lommel
noreply at git.blender.org
Mon Sep 21 02:00:19 CEST 2015
Commit: 726727191ab66fb4a02d4d0bd12b03d5f73f1c5f
Author: Brecht Van Lommel
Date: Mon Sep 21 01:48:37 2015 +0200
Branches: master
https://developer.blender.org/rB726727191ab66fb4a02d4d0bd12b03d5f73f1c5f
Fix T43715: IK pole target + stretch not working for a single bone chain.
===================================================================
M intern/iksolver/intern/IK_Solver.cpp
===================================================================
diff --git a/intern/iksolver/intern/IK_Solver.cpp b/intern/iksolver/intern/IK_Solver.cpp
index 65ea4d6..eb18cde 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);
More information about the Bf-blender-cvs
mailing list