Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2020-04-10 14:58:56 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-04-10 15:01:02 +0300
commit9a7f5f1bb42292eeb70b4832e7883846df0cb76a (patch)
tree039d9017f2815b4689ecd051ee39a7323d79bbc2 /source/blender/depsgraph
parent9c5b0542069bfec5ba8bfa65fa031014d3750cbe (diff)
Fix T67232: Multiples targetless IKs in a chain gives weird behaviour (known as FakeIK for FK posing)
The issue was that the deps graph relation builder assumed that all bones that had a IK constraint on them would be evaluated. However for targetless IK bones, only the active bone would receive updates and the others would be skipped (as those would be treated as if the IK constraint was disabled). I didn't see an easy way to solve this from the depsgraph side of things. Instead I came up with a solution that I feel is quite strait forward and reflects what is actually supposed to happen under the hood. Now all targetless IK constraints are treated as disabled and will not be added to any relations in the depsgraph. Instead, a temporary IK constraint will be created when the bone in question is transformed. This is basically activating "Auto IK" for the bone while transforming. Reviewed By: Sergey, Brecht Differential Revision: http://developer.blender.org/D7378
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
index 6fe9a3c2a00..d05385a7d7c 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -68,6 +68,12 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *object,
bConstraint *con,
RootPChanMap *root_map)
{
+ if ((con->flag & CONSTRAINT_DISABLE) != 0) {
+ /* Do not add disabled IK constraints to the relations. If these needs to be temporarly
+ * enabled, they will be added as temporary constraints during transform. */
+ return;
+ }
+
bKinematicConstraint *data = (bKinematicConstraint *)con->data;
/* Attach owner to IK Solver to. */
bPoseChannel *rootchan = BKE_armature_ik_solver_find_root(pchan, data);