This patch fixes T73051: Multiple IK chains influencing the same bone don't work. The cause of the issue was the absence of relations in the depsgraph between IK solvers of overlapping chains.
For example, this rig has two overlapping chains:
Before this patch, the Thumb IK constraint was not updated when the Wrist IK target moved. This patch adds a dependency to do this update.
Each POSE_IK_SOLVER depsgraph operation node depends on the chain bones' BONE_READY nodes, and is a dependency of those bones' BONE_DONE nodes. This patch adds a relation between the POSE_IK_SOLVER of one chain and the chain root of any overlapping chain higher up in the bone hierarchy. This ensures proper updates and fixes T73051.
There could be an alternative approach to solve this. The root_map object contains the set of IK chain roots for each bone. For each such set that has more than one root, we could add this relation to the depsgraph. However, this would not only require additional code for the RootPChanMap class, it would also require inspecting the hierarchy to determine the hierarchical order of those bones. As such it would produce more & more complex code than the current approach, which is why I didn't implement this.
This is a test file that adds a Spine IK chain to the example file of T73051, to ensure that this works as well:
This is a simpler case with three bones and two overlapping IK chains:
