diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-07-02 14:47:53 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-07-15 17:12:36 +0300 |
commit | 28dc07a153dd2c16260fb0c824a4f65ab3a06493 (patch) | |
tree | bb567d48e6f47a8fe8f540ed233830ffda1e99cd /source/blender/blenkernel/BKE_armature.h | |
parent | 9473c61b366cb3d55bac873e4a6cebd77595ee0d (diff) |
Animation: add function to blend Action into pose
Add function `BKE_pose_apply_action_blend()`, which blends a given
Action into current pose. The Action is evaluated at a specified frame,
and the result is applied to the armature's pose.
A blend factor can be given to blend between the current pose and the
one in the Action. Quaternions are interpolated with SLERP; it is
assumed that their FCurves are consecutively stored in the Action.
This function will be used in the upcoming new Pose Library.
Diffstat (limited to 'source/blender/blenkernel/BKE_armature.h')
-rw-r--r-- | source/blender/blenkernel/BKE_armature.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index a09c3e361b6..1f9e304c7a3 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -215,6 +215,10 @@ void BKE_pose_apply_action_all_bones(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context); +void BKE_pose_apply_action_blend(struct Object *ob, + struct bAction *action, + struct AnimationEvalContext *anim_eval_context, + float blend_factor); void vec_roll_to_mat3(const float vec[3], const float roll, float r_mat[3][3]); void vec_roll_to_mat3_normalized(const float nor[3], const float roll, float r_mat[3][3]); |