[Bf-blender-cvs] [247ddb6237a] blender2.8: Depsgraph: Fix relations update when transform is done and there was no temporary constraints created

Sergey Sharybin noreply at git.blender.org
Tue Jul 25 14:38:12 CEST 2017


Commit: 247ddb6237acda238c58e84b2bea87e5fc546c78
Author: Sergey Sharybin
Date:   Tue Jul 25 14:30:43 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB247ddb6237acda238c58e84b2bea87e5fc546c78

Depsgraph: Fix relations update when transform is done and there was no temporary constraints created

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

M	source/blender/editors/transform/transform_conversions.c

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

diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 094c1d48366..94d5ad4473a 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -849,6 +849,7 @@ static void pose_grab_with_ik_clear(Object *ob)
 	bKinematicConstraint *data;
 	bPoseChannel *pchan;
 	bConstraint *con, *next;
+	bool relations_changed = false;
 
 	for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
 		/* clear all temporary lock flags */
@@ -862,6 +863,8 @@ static void pose_grab_with_ik_clear(Object *ob)
 			if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
 				data = con->data;
 				if (data->flag & CONSTRAINT_IK_TEMP) {
+					relations_changed = true;
+
 					/* iTaSC needs clear for removed constraints */
 					BIK_clear_data(ob->pose);
 
@@ -877,8 +880,10 @@ static void pose_grab_with_ik_clear(Object *ob)
 		}
 	}
 
-	/* TODO(sergey): Consider doing partial update only. */
-	DEG_relations_tag_update(G.main);
+	if (relations_changed) {
+		/* TODO(sergey): Consider doing partial update only. */
+		DEG_relations_tag_update(G.main);
+	}
 }
 
 /* adds the IK to pchan - returns if added */




More information about the Bf-blender-cvs mailing list