30 void pose_apply_disable_fcurves_for_unselected_bones(
bAction *action,
32 void pose_apply_restore_fcurves(
bAction *action);
34 void pose_apply(
struct Object *ob,
37 ActionApplier applier);
45 auto evaluate_and_apply =
50 pose_apply(ob, action, anim_eval_context, evaluate_and_apply);
65 const float blend_factor)
73 pose_apply(ob, action, anim_eval_context, evaluate_and_blend);
77 void pose_apply(
struct Object *ob,
80 ActionApplier applier)
83 if (pose ==
nullptr) {
89 const bool limit_to_selected_bones = !selected_bone_names.
is_empty();
91 if (limit_to_selected_bones) {
94 pose_apply_disable_fcurves_for_unselected_bones(action, selected_bone_names);
101 applier(&pose_owner_ptr, action, anim_eval_context);
103 if (limit_to_selected_bones) {
104 pose_apply_restore_fcurves(action);
108 void pose_apply_restore_fcurves(
bAction *action)
116 void pose_apply_disable_fcurves_for_unselected_bones(
bAction *action,
119 auto disable_unselected_fcurve = [&](
FCurve *fcu,
const char *bone_name) {
120 const bool is_bone_selected = selected_bone_names.
contains(bone_name);
121 if (!is_bone_selected) {
void animsys_evaluate_action(struct PointerRNA *ptr, struct bAction *act, const struct AnimationEvalContext *anim_eval_context, bool flush_to_original)
void animsys_blend_in_action(struct PointerRNA *ptr, struct bAction *act, const AnimationEvalContext *anim_eval_context, float blend_factor)
#define LISTBASE_FOREACH(type, var, list)
Object is a sort of wrapper for general info.
void BKE_pose_apply_action_selected_bones(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context)
void BKE_pose_apply_action_all_bones(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context)
void BKE_pose_apply_action_blend(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context, const float blend_factor)
bool contains(const Key &key) const
SyclQueue void void size_t num_bytes void
void BKE_action_find_fcurves_with_bones(const bAction *action, FoundFCurveCallback callback)
BoneNameSet BKE_armature_find_selected_bone_names(const bArmature *armature)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)