Fix T59734: cyclic dependency with drivers on PoseBone.bbone_*.
Allow more flexible use of drivers on B-Bone properties by connecting the dependencies to the actual operation node that uses the values, instead of the whole component.
This commit is contained in:
parent
c79b849097
commit
afa3aec45d
Notes:
blender-bot
2023-02-14 04:21:45 +01:00
Referenced by issue #59734, Cyclic dependency when b-bones parameters are driven by a child bone
|
@ -150,6 +150,11 @@ static bool pointer_to_component_node_criteria(
|
|||
/* Bone - generally, we just want the bone component. */
|
||||
*type = DEG_NODE_TYPE_BONE;
|
||||
*subdata = pchan->name;
|
||||
/* But B-Bone properties should connect to the actual operation. */
|
||||
if (!ELEM(NULL, pchan->bone, prop) && pchan->bone->segments > 1 &&
|
||||
STRPREFIX(RNA_property_identifier(prop), "bbone_")) {
|
||||
*operation_code = DEG_OPCODE_BONE_SEGMENTS;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue