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_animsys.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_animsys.h')
-rw-r--r-- | source/blender/blenkernel/BKE_animsys.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 030560015a9..07da9d75e59 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -268,6 +268,12 @@ void animsys_evaluate_action(struct PointerRNA *ptr, const struct AnimationEvalContext *anim_eval_context, bool flush_to_original); +/* Evaluate action, and blend the result into the current values (instead of overwriting fully). */ +void animsys_blend_in_action(struct PointerRNA *ptr, + struct bAction *act, + const AnimationEvalContext *anim_eval_context, + float blend_factor); + /* Evaluate Action Group */ void animsys_evaluate_action_group(struct PointerRNA *ptr, struct bAction *act, |