Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-03-12 12:38:19 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-03-12 12:38:31 +0300
commit0bb57c5accd491dfad424fbe39dbb224cc2698a8 (patch)
tree4b7053a4ac330bac7c6f85a7032b764f4efc2359 /source/blender/blenkernel/intern/armature_update.c
parent55824525670e068b503aa1f094ca3b5f23ab7257 (diff)
Make B-Bone deformation code more robust with bad cached segment data.
Various dependency graph problems can cause obsolete data to reach the armature modifier, so add checks to reduce the chance of crashing.
Diffstat (limited to 'source/blender/blenkernel/intern/armature_update.c')
-rw-r--r--source/blender/blenkernel/intern/armature_update.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index 12f3f5c7354..5cd82803fae 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -704,7 +704,9 @@ void BKE_pose_bone_done(struct Depsgraph *depsgraph,
}
bPoseChannel *pchan = pose_pchan_get_indexed(object, pchan_index);
float imat[4][4];
- DEG_debug_print_eval(depsgraph, __func__, pchan->name, pchan);
+ DEG_debug_print_eval_subdata(
+ depsgraph, __func__, object->id.name, object,
+ "pchan", pchan->name, pchan);
if (pchan->bone) {
invert_m4_m4(imat, pchan->bone->arm_mat);
mul_m4_m4m4(pchan->chan_mat, pchan->pose_mat, imat);
@@ -731,7 +733,9 @@ void BKE_pose_eval_bbone_segments(struct Depsgraph *depsgraph,
return;
}
bPoseChannel *pchan = pose_pchan_get_indexed(object, pchan_index);
- DEG_debug_print_eval(depsgraph, __func__, pchan->name, pchan);
+ DEG_debug_print_eval_subdata(
+ depsgraph, __func__, object->id.name, object,
+ "pchan", pchan->name, pchan);
if (pchan->bone != NULL && pchan->bone->segments > 1) {
BKE_pchan_bbone_segments_cache_compute(pchan);
if (DEG_is_active(depsgraph)) {
@@ -862,8 +866,10 @@ void BKE_pose_eval_proxy_copy_bone(
return;
}
BLI_assert(ID_IS_LINKED(object) && object->proxy_from != NULL);
- DEG_debug_print_eval(depsgraph, __func__, object->id.name, object);
bPoseChannel *pchan = pose_pchan_get_indexed(object, pchan_index);
+ DEG_debug_print_eval_subdata(
+ depsgraph, __func__, object->id.name, object,
+ "pchan", pchan->name, pchan);
/* TODO(sergey): Use indexec lookup, once it's guaranteed to be kept
* around for the time while proxies are evaluating.
*/