42 BoneNameSet pose_apply_find_selected_bones(
const bArmature *armature,
const bPose *pose);
43 void pose_apply_disable_fcurves_for_unselected_bones(
bAction *action,
44 const BoneNameSet &selected_bone_names);
45 void pose_apply_restore_fcurves(
bAction *action);
53 if (pose ==
nullptr) {
58 const BoneNameSet selected_bone_names = pose_apply_find_selected_bones(armature, pose);
59 const bool limit_to_selected_bones = !selected_bone_names.is_empty();
61 if (limit_to_selected_bones) {
64 pose_apply_disable_fcurves_for_unselected_bones(action, selected_bone_names);
72 if (limit_to_selected_bones) {
73 pose_apply_restore_fcurves(action);
78 BoneNameSet pose_apply_find_selected_bones(
const bArmature *armature,
const bPose *pose)
80 BoneNameSet selected_bone_names;
81 bool all_bones_selected =
true;
82 bool no_bones_selected =
true;
86 all_bones_selected &= is_selected;
87 no_bones_selected &= !is_selected;
91 selected_bone_names.add_new(pchan->name);
96 if (all_bones_selected || no_bones_selected) {
99 return selected_bone_names;
102 void pose_apply_restore_fcurves(
bAction *action)
110 void pose_apply_disable_fcurves_for_unselected_bones(
bAction *action,
111 const BoneNameSet &selected_bone_names)
114 if (!fcu->rna_path || !strstr(fcu->rna_path,
"pose.bones[")) {
123 const bool is_selected = selected_bone_names.contains(bone_name);
void animsys_evaluate_action(struct PointerRNA *ptr, struct bAction *act, const struct AnimationEvalContext *anim_eval_context, bool flush_to_original)
#define PBONE_SELECTED(arm, bone)
#define LISTBASE_FOREACH(type, var, list)
char * BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict prefix) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
Object is a sort of wrapper for general info.
void BKE_pose_apply_action(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context)
void(* MEM_freeN)(void *vmemh)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)