diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-09-25 16:48:38 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-01-01 17:53:54 +0300 |
commit | 89de073ea5c1efaf4883859e45645c1ab2c713ce (patch) | |
tree | 49dbc375e01678f1d25abdb4ea306b9a60c9b467 /source/blender/blenkernel | |
parent | 0cdfe887b4b3b439016354f3cf767a20859b70d8 (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 6bfc8c918d6..3bf3fd2512f 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -171,6 +171,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); |