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
38 lines
1.1 KiB
C++
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
|