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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-10-17 13:01:42 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-10-17 13:01:42 +0300
commit81cc57d90d1fc39816c0998afade539d6b71a56c (patch)
treec62568a4c6bfae6dcaffb93144ce980d4364ebf7
parentd2b900e715e894f6628607f3183ae94cfe8f0e8f (diff)
parentf45127c6cb34f1f44c7b34862127d8986bf72fe8 (diff)
Merge branch 'blender-v2.81-release'
-rw-r--r--source/blender/blenkernel/intern/armature_update.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index b6a2efb37b8..7c68c8319a5 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -728,6 +728,21 @@ void BKE_pose_constraints_evaluate(struct Depsgraph *depsgraph,
}
}
+static void pose_channel_flush_to_orig_if_needed(struct Depsgraph *depsgraph,
+ struct Object *object,
+ bPoseChannel *pchan)
+{
+ if (!DEG_is_active(depsgraph)) {
+ return;
+ }
+ const bArmature *armature = (bArmature *)object->data;
+ if (armature->edbo != NULL) {
+ return;
+ }
+ bPoseChannel *pchan_orig = pchan->orig_pchan;
+ BKE_pose_copy_pchan_result(pchan_orig, pchan);
+}
+
void BKE_pose_bone_done(struct Depsgraph *depsgraph, struct Object *object, int pchan_index)
{
const bArmature *armature = (bArmature *)object->data;
@@ -745,13 +760,9 @@ void BKE_pose_bone_done(struct Depsgraph *depsgraph, struct Object *object, int
mat4_to_dquat(&pchan->runtime.deform_dual_quat, pchan->bone->arm_mat, pchan->chan_mat);
}
}
- if (DEG_is_active(depsgraph) && armature->edbo == NULL) {
+ pose_channel_flush_to_orig_if_needed(depsgraph, object, pchan);
+ if (DEG_is_active(depsgraph)) {
bPoseChannel *pchan_orig = pchan->orig_pchan;
- copy_m4_m4(pchan_orig->pose_mat, pchan->pose_mat);
- copy_m4_m4(pchan_orig->chan_mat, pchan->chan_mat);
- copy_v3_v3(pchan_orig->pose_head, pchan->pose_mat[3]);
- copy_m4_m4(pchan_orig->constinv, pchan->constinv);
- BKE_pose_where_is_bone_tail(pchan_orig);
if (pchan->bone == NULL || pchan->bone->segments <= 1) {
BKE_pose_channel_free_bbone_cache(&pchan_orig->runtime);
}
@@ -912,4 +923,6 @@ void BKE_pose_eval_proxy_copy_bone(struct Depsgraph *depsgraph, Object *object,
BKE_pose_copy_pchan_result(pchan, pchan_from);
copy_dq_dq(&pchan->runtime.deform_dual_quat, &pchan_from->runtime.deform_dual_quat);
BKE_pchan_bbone_segments_cache_copy(pchan, pchan_from);
+
+ pose_channel_flush_to_orig_if_needed(depsgraph, object, pchan);
}