[Bf-blender-cvs] [74ee98f6422] master: Depsgraph: Fix dependency when constraint influence drives some other constraint

Sergey Sharybin noreply at git.blender.org
Wed Feb 21 12:06:56 CET 2018


Commit: 74ee98f6422275c77d6186790379f4135c4a5a59
Author: Sergey Sharybin
Date:   Wed Feb 21 11:13:25 2018 +0100
Branches: master
https://developer.blender.org/rB74ee98f6422275c77d6186790379f4135c4a5a59

Depsgraph: Fix dependency when constraint influence drives some other constraint

It is not possible to address transform at particular position of constraint
stack, and when constraint is being addressed is usually from driver variable.

This fixes some of dependency cycles reported in T54083.

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

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

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

diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 997e7ad1d40..13b9f746e6b 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -149,16 +149,20 @@ static bool pointer_to_component_node_criteria(
 		Object *object = (Object *)ptr->id.data;
 		bConstraint *con = (bConstraint *)ptr->data;
 		/* Check whether is object or bone constraint. */
+		/* NOTE: Currently none of the area can address transform of an object
+		 * at a given constraint, but for rigging one might use constraint
+		 * influence to be used to drive some corrective shape keys or so.
+		 */
 		if (BLI_findindex(&object->constraints, con) != -1) {
-			/* Constraint is defining object transform. */
 			*type = DEG_NODE_TYPE_TRANSFORM;
+			*operation_code = DEG_OPCODE_TRANSFORM_LOCAL;
 			return true;
 		}
 		else if (object->pose != NULL) {
 			LISTBASE_FOREACH(bPoseChannel *, pchan, &object->pose->chanbase) {
 				if (BLI_findindex(&pchan->constraints, con) != -1) {
-					/* bone transforms */
 					*type = DEG_NODE_TYPE_BONE;
+					*operation_code = DEG_OPCODE_BONE_LOCAL;
 					*subdata = pchan->name;
 					return true;
 				}



More information about the Bf-blender-cvs mailing list