diff --git a/source/blender/animrig/ANIM_bone_collections.hh b/source/blender/animrig/ANIM_bone_collections.hh index 7995cd8f7f1..463a62534ce 100644 --- a/source/blender/animrig/ANIM_bone_collections.hh +++ b/source/blender/animrig/ANIM_bone_collections.hh @@ -265,12 +265,12 @@ void ANIM_armature_bonecoll_reconstruct(struct bArmature *armature); */ /** Return true when any of the bone's collections is visible. */ -bool ANIM_bonecoll_is_visible(const struct bArmature *armature, const struct Bone *bone); +bool ANIM_bone_in_visible_collection(const struct bArmature *armature, const struct Bone *bone); inline bool ANIM_bone_is_visible(const struct bArmature *armature, const struct Bone *bone) { const bool bone_itself_visible = (bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0; - return bone_itself_visible && ANIM_bonecoll_is_visible(armature, bone); + return bone_itself_visible && ANIM_bone_in_visible_collection(armature, bone); } bool ANIM_bonecoll_is_visible_editbone(const struct bArmature *armature, @@ -286,12 +286,12 @@ inline bool ANIM_bone_is_visible_editbone(const struct bArmature *armature, inline bool ANIM_bonecoll_is_visible_pchan(const struct bArmature *armature, const struct bPoseChannel *pchan) { - return ANIM_bonecoll_is_visible(armature, pchan->bone); + return ANIM_bone_in_visible_collection(armature, pchan->bone); } inline bool ANIM_bonecoll_is_visible_actbone(const struct bArmature *armature) { - return ANIM_bonecoll_is_visible(armature, armature->act_bone); + return ANIM_bone_in_visible_collection(armature, armature->act_bone); } void ANIM_armature_bonecoll_show_all(struct bArmature *armature); diff --git a/source/blender/animrig/intern/bone_collections.cc b/source/blender/animrig/intern/bone_collections.cc index 4baeb95391b..34182372e3a 100644 --- a/source/blender/animrig/intern/bone_collections.cc +++ b/source/blender/animrig/intern/bone_collections.cc @@ -869,7 +869,7 @@ static bool any_bone_collection_visible(const ListBase /*BoneCollectionRef*/ *co /* TODO: these two functions were originally implemented for armature layers, hence the armature * parameters. These should be removed at some point. */ -bool ANIM_bonecoll_is_visible(const bArmature * /*armature*/, const Bone *bone) +bool ANIM_bone_in_visible_collection(const bArmature * /*armature*/, const Bone *bone) { return any_bone_collection_visible(&bone->runtime.collections); } @@ -934,7 +934,7 @@ bool ANIM_armature_bonecoll_contains_active_bone(const struct bArmature *armatur void ANIM_armature_bonecoll_show_from_bone(bArmature *armature, const Bone *bone) { - if (ANIM_bonecoll_is_visible(armature, bone)) { + if (ANIM_bone_in_visible_collection(armature, bone)) { return; } diff --git a/source/blender/blenkernel/intern/action.cc b/source/blender/blenkernel/intern/action.cc index c60593faae4..b0f65ac882d 100644 --- a/source/blender/blenkernel/intern/action.cc +++ b/source/blender/blenkernel/intern/action.cc @@ -680,7 +680,7 @@ bool BKE_pose_channels_is_valid(const bPose *pose) bool BKE_pose_is_bonecoll_visible(const bArmature *arm, const bPoseChannel *pchan) { - return pchan->bone && ANIM_bonecoll_is_visible(arm, pchan->bone); + return pchan->bone && ANIM_bone_in_visible_collection(arm, pchan->bone); } bPoseChannel *BKE_pose_channel_active(Object *ob, const bool check_bonecoll) @@ -693,7 +693,7 @@ bPoseChannel *BKE_pose_channel_active(Object *ob, const bool check_bonecoll) /* find active */ LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) { if ((pchan->bone) && (pchan->bone == arm->act_bone)) { - if (!check_bonecoll || ANIM_bonecoll_is_visible(arm, pchan->bone)) { + if (!check_bonecoll || ANIM_bone_in_visible_collection(arm, pchan->bone)) { return pchan; } } diff --git a/source/blender/editors/armature/armature_skinning.cc b/source/blender/editors/armature/armature_skinning.cc index 57d2b8819eb..9d06e8e57a5 100644 --- a/source/blender/editors/armature/armature_skinning.cc +++ b/source/blender/editors/armature/armature_skinning.cc @@ -166,7 +166,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap) } if (!data->is_weight_paint || - (ANIM_bonecoll_is_visible(arm, bone) && (bone->flag & BONE_SELECTED))) + (ANIM_bone_in_visible_collection(arm, bone) && (bone->flag & BONE_SELECTED))) { if (!(defgroup = BKE_object_defgroup_find_name(ob, bone->name))) { defgroup = BKE_object_defgroup_add_name(ob, bone->name); @@ -385,7 +385,7 @@ static void add_verts_to_dgroups(ReportList *reports, /* set selected */ if (wpmode) { - if (ANIM_bonecoll_is_visible(arm, bone) && (bone->flag & BONE_SELECTED)) { + if (ANIM_bone_in_visible_collection(arm, bone) && (bone->flag & BONE_SELECTED)) { selected[j] = 1; } } diff --git a/source/blender/editors/armature/pose_edit.cc b/source/blender/editors/armature/pose_edit.cc index 0327e6deea3..69b0f2d4d1b 100644 --- a/source/blender/editors/armature/pose_edit.cc +++ b/source/blender/editors/armature/pose_edit.cc @@ -674,7 +674,7 @@ static int hide_pose_bone_fn(Object *ob, Bone *bone, void *ptr) bArmature *arm = static_cast(ob->data); const bool hide_select = bool(POINTER_AS_INT(ptr)); int count = 0; - if (ANIM_bonecoll_is_visible(arm, bone)) { + if (ANIM_bone_in_visible_collection(arm, bone)) { if (((bone->flag & BONE_SELECTED) != 0) == hide_select) { bone->flag |= BONE_HIDDEN_P; /* only needed when 'hide_select' is true, but harmless. */ @@ -744,7 +744,7 @@ static int show_pose_bone_cb(Object *ob, Bone *bone, void *data) bArmature *arm = static_cast(ob->data); int count = 0; - if (ANIM_bonecoll_is_visible(arm, bone)) { + if (ANIM_bone_in_visible_collection(arm, bone)) { if (bone->flag & BONE_HIDDEN_P) { if (!(bone->flag & BONE_UNSELECTABLE)) { SET_FLAG_FROM_TEST(bone->flag, select, BONE_SELECTED); diff --git a/source/blender/editors/armature/pose_transform.cc b/source/blender/editors/armature/pose_transform.cc index 9538635f74b..895f1da1b2f 100644 --- a/source/blender/editors/armature/pose_transform.cc +++ b/source/blender/editors/armature/pose_transform.cc @@ -606,7 +606,7 @@ static void set_pose_keys(Object *ob) if (ob->pose) { LISTBASE_FOREACH (bPoseChannel *, chan, &ob->pose->chanbase) { Bone *bone = chan->bone; - if ((bone) && (bone->flag & BONE_SELECTED) && ANIM_bonecoll_is_visible(arm, bone)) { + if ((bone) && (bone->flag & BONE_SELECTED) && ANIM_bone_in_visible_collection(arm, bone)) { chan->flag |= POSE_KEY; } else { diff --git a/source/blender/editors/gpencil_legacy/gpencil_armature.cc b/source/blender/editors/gpencil_legacy/gpencil_armature.cc index 71b30b19e5c..da28669f2d7 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_armature.cc +++ b/source/blender/editors/gpencil_legacy/gpencil_armature.cc @@ -209,7 +209,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap) segments = 1; } - if (ANIM_bonecoll_is_visible(arm, bone)) { + if (ANIM_bone_in_visible_collection(arm, bone)) { if (!(defgroup = BKE_object_defgroup_find_name(ob, bone->name))) { defgroup = BKE_object_defgroup_add_name(ob, bone->name); } diff --git a/source/blender/editors/transform/transform_orientations.cc b/source/blender/editors/transform/transform_orientations.cc index f25474205a6..eded68ccfa7 100644 --- a/source/blender/editors/transform/transform_orientations.cc +++ b/source/blender/editors/transform/transform_orientations.cc @@ -555,7 +555,7 @@ static int armature_bone_transflags_update_recursive(bArmature *arm, bone->flag &= ~BONE_TRANSFORM; do_next = do_it; if (do_it) { - if (ANIM_bonecoll_is_visible(arm, bone)) { + if (ANIM_bone_in_visible_collection(arm, bone)) { if (bone->flag & BONE_SELECTED) { bone->flag |= BONE_TRANSFORM; total++;