Refactor: Remove unused bone flag

No functional changes intended.

This removes the `BONE_HIDDEN_PG` flag for Bones.
It was never set, only read so it had no effect.

Part of #138482

Pull Request: https://projects.blender.org/blender/blender/pulls/138802
This commit is contained in:
Christoph Lendenfeld
2025-05-16 13:43:56 +02:00
committed by Christoph Lendenfeld
parent 1035a7c463
commit 45240026a2
4 changed files with 3 additions and 5 deletions

View File

@@ -307,7 +307,7 @@ bool ANIM_bone_in_visible_collection(const bArmature *armature, const Bone *bone
inline bool ANIM_bone_is_visible(const bArmature *armature, const Bone *bone)
{
const bool bone_itself_visible = (bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0;
const bool bone_itself_visible = (bone->flag & BONE_HIDDEN_P) == 0;
return bone_itself_visible && ANIM_bone_in_visible_collection(armature, bone);
}

View File

@@ -2183,7 +2183,7 @@ void Armatures::draw_armature_pose(Armatures::DrawContext *ctx)
}
eBone_Flag boneflag = eBone_Flag(bone->flag);
if (bone->parent && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG))) {
if (bone->parent && (bone->parent->flag & BONE_HIDDEN_P)) {
/* Avoid drawing connection line to hidden parent. */
boneflag &= ~BONE_CONNECTED;
}

View File

@@ -65,7 +65,7 @@ eSnapMode snapArmature(SnapObjectContext *sctx,
else if (ob_eval->pose && ob_eval->pose->chanbase.first) {
LISTBASE_FOREACH (bPoseChannel *, pchan, &ob_eval->pose->chanbase) {
Bone *bone = pchan->bone;
if (!bone || (bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG))) {
if (!bone || (bone->flag & BONE_HIDDEN_P)) {
/* Skip hidden bones. */
continue;
}

View File

@@ -452,8 +452,6 @@ typedef enum eBone_Flag {
/** No parent scale */
BONE_NO_SCALE = (1 << 15),
#endif
/** hidden bone when drawing PoseChannels (for ghost drawing) */
BONE_HIDDEN_PG = (1 << 16),
/** bone should be drawn as OB_WIRE, regardless of draw-types of view+armature */
BONE_DRAWWIRE = (1 << 17),
/** when no parent, bone will not get cyclic offset */