bdk-blender/source/blender/ikplugin
Christoph Lendenfeld 0c2afa7c17 Fix #111553: Double IK constraint not working
It seems that the code only ever converted the
first IK constraint found into a `PoseTree`.
Before #110417 constraints with zero influence were
skipped so it worked, except for the bug with the depsgraph.

After this patch the logic is the following:
From top to bottom of the constraint stack,
keep adding constraints until the first constraint with influence is added.

This ensures, that if there is only one disabled constraint,
it still gets converted into a `PoseTree`,
which is needed for the depsgraph to work correctly.

The resulting behavior from adding the first active constraint is
that the higher in the stack the constraint is, the higher its priority.

To achieve that I split off a helper function `find_ik_constraints`
that populates a vector of `bConstraint` pointers.
The code to create the `PoseTree` is still largely the same,
except I moved a few variables closer to where they are used.

Pull Request: blender/blender#113056
2023-10-10 09:06:28 +02:00
..
intern Fix #111553: Double IK constraint not working 2023-10-10 09:06:28 +02:00
BIK_api.h Cleanup: Add a copyright notice to files and use SPDX format 2023-05-31 16:19:06 +02:00
CMakeLists.txt License Headers: Set copyright to "Blender Authors", add AUTHORS 2023-08-16 00:20:26 +10:00