Files
test2/source/blender/animrig/ANIM_pose.hh
Sybren A. Stüvel 7cb77d925a Anim: add NLA evaluation of slotted Actions
Add support for slotted Actions to the NLA evaluation code.

This also affects the pose library code and the Action Constraint. These
both share some Action evaluation logic with the NLA. They now
explicitly looks at only the first Action slot. The Action Constraint will
have to be updated to have an explicit slot selector, but that's for another
commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/127425
2024-09-13 12:34:50 +02:00

43 lines
1.3 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
#include "ANIM_action.hh"
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,
slot_handle_t slot_handle,
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,
slot_handle_t slot_handle,
const AnimationEvalContext *anim_eval_context);
void pose_apply_action_blend(Object *ob,
bAction *action,
slot_handle_t slot_handle,
const AnimationEvalContext *anim_eval_context,
float blend_factor);
} // namespace blender::animrig