Fix T63574: missing implicit parent bone dependency in proxies.

Although technically evaluating the proxy copy nodes doesn't require
the parent bone to be copied, other nodes that depend on the bones
sometimes expect the parent to be ready. To meet this expectation
it's necessary to add the dependency to the graph.
This commit is contained in:
2019-04-15 19:53:52 +03:00
parent 10bf1d9ac1
commit 2f2ba04c60

View File

@@ -578,6 +578,18 @@ void DepsgraphRelationBuilder::build_proxy_rig(Object *object)
"Bone Done -> Bone Done");
}
/* Parent relation: even though the proxy bone itself doesn't need
* the parent bone, some users expect the parent to be ready if the
* bone itself is (e.g. for computing the local space matrix).
*/
if (pchan->parent != NULL) {
OperationKey parent_key(&object->id,
NodeType::BONE,
pchan->parent->name,
OperationCode::BONE_DONE);
add_relation(parent_key, bone_done_key, "Parent Bone -> Child Bone");
}
if (pchan->prop != NULL) {
OperationKey bone_parameters(&object->id,
NodeType::PARAMETERS,