[Bf-blender-cvs] [fbf4b2f17a7] master: Add check (error message + assert) that pose is valid in armature evaluation.

Bastien Montagne noreply at git.blender.org
Fri May 5 10:07:15 CEST 2017


Commit: fbf4b2f17a7bf43707125a86f5debe580e3008e0
Author: Bastien Montagne
Date:   Fri May 5 09:47:35 2017 +0200
Branches: master
https://developer.blender.org/rBfbf4b2f17a7bf43707125a86f5debe580e3008e0

Add check (error message + assert) that pose is valid in armature evaluation.

Not sure how this happens, but in some cases we can evaluate
deformations of an armature which pose is not valid, at least put a
warning here to help identifying the issue quickly.

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

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

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

diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 02cc31e5977..1ee71c8448c 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -982,6 +982,11 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float
 		return;
 	}
 
+	if ((armOb->pose->flag & POSE_RECALC) != 0) {
+		printf("ERROR! Trying to evaluate influence of armature '%s' which needs Pose recalc!", armOb->id.name);
+		BLI_assert(0);
+	}
+
 	invert_m4_m4(obinv, target->obmat);
 	copy_m4_m4(premat, target->obmat);
 	mul_m4_m4m4(postmat, obinv, armOb->obmat);




More information about the Bf-blender-cvs mailing list