Page MenuHome

Fix asserts when two (or more) SplineIK constraints have the same root
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Nov 5 2020, 4:06 PM.

Details

Summary

Afaics, only a single DEG operation node POSE_SPLINE_IK_SOLVER should
be added in this case [ see build_splineik_pose, same is already done
for overlapping IK in build_ik_pose]

rB87b551e83659 is probably related.

ref T82347.

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Nov 5 2020, 4:06 PM

  • Open blend
  • Bone.002 has a SplineIK constraint with common_root as the root (Chain Length 3)
  • change Bone.001 Chain Length to 2 ( so it also has common_root as the root )

--> Assert

BLI_assert failed: source/blender/depsgraph/intern/builder/deg_builder_nodes.cc:226, add_operation_node(), at '!"Should not happen!"'
source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
121

When would this happen?

125

This makese sense.

remove paranoid nullptr check

source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
121

This was a brainless copy/paste relict from regular IK
(there it actually makes sense, see rB6d8f63a8343a)

Philipp Oeser (lichtwerk) marked an inline comment as done.Nov 12 2020, 11:45 AM

Do you have a simple test file to check the patch? I tried to reproduce the problem by having two Spline IK constraints with overlapping chains, but that doesn't show the error.

This is the file I used:

Do you have a simple test file to check the patch? I tried to reproduce the problem by having two Spline IK constraints with overlapping chains, but that doesn't show the error.

This is the file I used:

In that file, select Bone.007 [the other bone next to Bone.001 having a SplineIK constraint] and change its Chain Length from 4 to 2 [so it corresponds with the Chain Length of 8 of the Bone.001 -- meaning they would end up having the same root]

This revision is now accepted and ready to land.Nov 12 2020, 1:05 PM