diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-09-25 16:48:38 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-09-25 16:48:55 +0300 |
commit | 675cef0a165ad535546f24faf9d0ac474f704e64 (patch) | |
tree | 55894e14870b9e6ed0bdc3fdd94ed185480ea710 /source/blender/blenkernel | |
parent | ce54d25fa961d3021986f6b741c65f99db7bfd41 (diff) |
Fix T52835: When driven IK influence change, ik animation have 1 frame delay
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_armature.h | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/armature_update.c | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 1cc42f788d5..60fb79d75d5 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -172,6 +172,11 @@ void BKE_pose_eval_init(struct EvaluationContext *eval_ctx, struct Object *ob, struct bPose *pose); +void BKE_pose_eval_init_ik(struct EvaluationContext *eval_ctx, + struct Scene *scene, + struct Object *ob, + struct bPose *pose); + void BKE_pose_eval_bone(struct EvaluationContext *eval_ctx, struct Scene *scene, struct Object *ob, diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index a4714041edf..45d1d36aeca 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -559,11 +559,10 @@ void BKE_splineik_execute_tree(Scene *scene, Object *ob, bPoseChannel *pchan_roo /* *************** Depsgraph evaluation callbacks ************ */ void BKE_pose_eval_init(EvaluationContext *UNUSED(eval_ctx), - Scene *scene, + Scene *UNUSED(scene), Object *ob, bPose *pose) { - float ctime = BKE_scene_frame_get(scene); /* not accurate... */ bPoseChannel *pchan; DEBUG_PRINT("%s on %s\n", __func__, ob->id.name); @@ -581,6 +580,16 @@ void BKE_pose_eval_init(EvaluationContext *UNUSED(eval_ctx), for (pchan = pose->chanbase.first; pchan != NULL; pchan = pchan->next) { pchan->flag &= ~(POSE_DONE | POSE_CHAIN | POSE_IKTREE | POSE_IKSPLINE); } +} + +void BKE_pose_eval_init_ik(EvaluationContext *UNUSED(eval_ctx), + Scene *scene, + Object *ob, + bPose *UNUSED(pose)) +{ + float ctime = BKE_scene_frame_get(scene); /* not accurate... */ + + DEBUG_PRINT("%s on %s\n", __func__, ob->id.name); /* 2a. construct the IK tree (standard IK) */ BIK_initialize_tree(scene, ob, ctime); |