Files
test/source/blender/animrig/ANIM_pose.hh
Christoph Lendenfeld a661a7bf89 Refactor: Move Pose code out of the kernel
Move the functions
* `BKE_pose_apply_action_selected_bones`
* `BKE_pose_apply_action_all_bones`
* and `BKE_pose_apply_action_blend`

out of the blender kernel and into animrig.

This will allow solving #126969 without having to include
animrig code in the blender kernel.

Pull Request: https://projects.blender.org/blender/blender/pulls/126978
2024-09-05 10:41:34 +02:00

38 lines
1.1 KiB
C++

/* SPDX-FileCopyrightText: 2024 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup animrig
*
* \brief Functions to work with animation poses.
*/
#pragma once
struct AnimationEvalContext;
struct Object;
struct bAction;
namespace blender::animrig {
/**
* Evaluate the action and apply it to the pose. If any pose bones are selected, only FCurves that
* relate to those bones are evaluated.
*/
void pose_apply_action_selected_bones(Object *ob,
bAction *action,
const AnimationEvalContext *anim_eval_context);
/**
* Evaluate the action and apply it to the pose. Ignore selection state of the bones.
*/
void pose_apply_action_all_bones(Object *ob,
bAction *action,
const AnimationEvalContext *anim_eval_context);
void pose_apply_action_blend(Object *ob,
bAction *action,
const AnimationEvalContext *anim_eval_context,
float blend_factor);
} // namespace blender::animrig