[Bf-blender-cvs] [d80587a] depsgraph_refactor: Depsgrpah: Remove bone eval check from a while ago

Sergey Sharybin noreply at git.blender.org
Fri Feb 27 13:34:40 CET 2015


Commit: d80587aabe164c3aa06b129758404f85a8a6b6c9
Author: Sergey Sharybin
Date:   Fri Feb 27 17:29:07 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rBd80587aabe164c3aa06b129758404f85a8a6b6c9

Depsgrpah: Remove bone eval check from a while ago

It doesn't really fully working because it's possible only part of armature will be
tagged for update now.

What is not clear currently if it's legit situation when we're updating only parts
of the armature or it could lead to some matrix space mismatch.

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

M	source/blender/blenkernel/intern/armature_update.c

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

diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index ec76c9d..61c7f14 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -558,11 +558,6 @@ void BKE_splineik_execute_tree(Scene *scene, Object *ob, bPoseChannel *pchan_roo
 
 /* *************** Depsgraph evaluation callbacks ************ */
 
-/* XXX: Temp hack for cycles detection! */
-enum {
-	POSE_UNUSED2 = (1 << 4)
-};
-
 void BKE_pose_eval_init(EvaluationContext *UNUSED(eval_ctx),
                         Scene *scene,
                         Object *ob,
@@ -585,7 +580,6 @@ void BKE_pose_eval_init(EvaluationContext *UNUSED(eval_ctx),
 	/* 1. clear flags */
 	for (pchan = pose->chanbase.first; pchan != NULL; pchan = pchan->next) {
 		pchan->flag &= ~(POSE_DONE | POSE_CHAIN | POSE_IKTREE | POSE_IKSPLINE);
-		pchan->flag &= ~POSE_UNUSED2;
 	}
 
 	/* 2a. construct the IK tree (standard IK) */
@@ -655,7 +649,6 @@ void BKE_pose_bone_done(EvaluationContext *UNUSED(eval_ctx),
 		invert_m4_m4(imat, pchan->bone->arm_mat);
 		mul_m4_m4m4(pchan->chan_mat, pchan->pose_mat, imat);
 	}
-	pchan->flag |= POSE_UNUSED2;
 }
 
 void BKE_pose_iktree_evaluate(EvaluationContext *UNUSED(eval_ctx),
@@ -687,24 +680,6 @@ void BKE_pose_eval_flush(EvaluationContext *UNUSED(eval_ctx),
 	DEBUG_PRINT("%s on %s\n", __func__, ob->id.name);
 	BLI_assert(ob->type == OB_ARMATURE);
 
-	{
-		bPoseChannel *pchan;
-		for (pchan = ob->pose->chanbase.first;
-		     pchan != NULL;
-		     pchan = pchan->next)
-		{
-			if ((pchan->flag & POSE_UNUSED2) == 0) {
-				float imat[4][4];
-				printf("ERROR: Pose channel %s did not evaluate, should not happen!\n",
-				       pchan->name);
-				if (pchan->bone) {
-					invert_m4_m4(imat, pchan->bone->arm_mat);
-					mul_m4_m4m4(pchan->chan_mat, pchan->pose_mat, imat);
-				}
-			}
-		}
-	}
-
 	/* 6. release the IK tree */
 	BIK_release_tree(scene, ob, ctime);




More information about the Bf-blender-cvs mailing list