27void pose_apply_restore_fcurves(
bAction *action)
31 fcu->flag &= ~FCURVE_DISABLED;
35void pose_apply_disable_fcurves_for_unselected_bones(
38 auto disable_unselected_fcurve = [&](
FCurve *fcu,
const char *bone_name) {
39 const bool is_bone_selected = selected_bone_names.
contains(bone_name);
40 if (!is_bone_selected) {
51 ActionApplier applier)
54 if (pose ==
nullptr) {
61 const bool limit_to_selected_bones = !selected_bone_names.
is_empty();
63 if (limit_to_selected_bones) {
66 pose_apply_disable_fcurves_for_unselected_bones(action, selected_bone_names);
72 applier(&pose_owner_ptr, action, slot_handle, anim_eval_context);
74 if (limit_to_selected_bones) {
75 pose_apply_restore_fcurves(action);
93 pose_apply(ob, action, slot_handle, anim_eval_context, evaluate_and_apply);
109 const float blend_factor)
118 pose_apply(ob, action, slot_handle, anim_eval_context, evaluate_and_blend);
Functions and classes to work with Actions.
Functions to work with animation poses.
Blender kernel action and pose functionality.
void animsys_blend_in_action(struct PointerRNA *ptr, struct bAction *act, int32_t action_slot_handle, const AnimationEvalContext *anim_eval_context, float blend_factor)
void animsys_evaluate_action(struct PointerRNA *ptr, struct bAction *act, int32_t action_slot_handle, const struct AnimationEvalContext *anim_eval_context, bool flush_to_original)
#define LISTBASE_FOREACH(type, var, list)
Object is a sort of wrapper for general info.
bool contains(const Key &key) const
void pose_apply_action_all_bones(Object *ob, bAction *action, slot_handle_t slot_handle, const AnimationEvalContext *anim_eval_context)
void pose_apply_action_selected_bones(Object *ob, bAction *action, slot_handle_t slot_handle, const AnimationEvalContext *anim_eval_context)
decltype(::ActionSlot::handle) slot_handle_t
void pose_apply_action_blend(Object *ob, bAction *action, slot_handle_t slot_handle, const AnimationEvalContext *anim_eval_context, float blend_factor)
void BKE_action_find_fcurves_with_bones(const bAction *action, FoundFCurveCallback callback)
BoneNameSet BKE_armature_find_selected_bone_names(const bArmature *armature)
PointerRNA RNA_id_pointer_create(ID *id)