[Bf-blender-cvs] [2f2ba04c605] master: Fix T63574: missing implicit parent bone dependency in proxies.

Alexander Gavrilov noreply at git.blender.org
Mon Apr 15 19:12:26 CEST 2019


Commit: 2f2ba04c6053540ea3a4cd6617cd6b4e38d89c93
Author: Alexander Gavrilov
Date:   Mon Apr 15 19:53:52 2019 +0300
Branches: master
https://developer.blender.org/rB2f2ba04c6053540ea3a4cd6617cd6b4e38d89c93

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.

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
index 9fd4a8dc802..9d36e9495e3 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -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,



More information about the Bf-blender-cvs mailing list