Experimental Armature Drawing Tweak for Relationship Lines

Only show hierarchy relationship lines when bone or its parent is selected.
This cuts down the clutter visible in general when relationship lines are
enabled (currently they can't be disabled), which should make it more useful
to keep them on (e.g. constraint lines/hints can still be drawn this way).
This commit is contained in:
Joshua Leung 2018-05-22 13:09:08 +02:00
parent e12df10120
commit 47b9d7494e
Notes: blender-bot 2023-02-14 05:51:18 +01:00
Referenced by issue #55147, Eyedropper cursor icon missing when adding drivers (e.g. When using All/Single from Target)
1 changed files with 7 additions and 2 deletions

View File

@ -1459,8 +1459,13 @@ static void draw_bone_relations(
}
}
else if (pchan && pchan->parent) {
if ((boneflag & BONE_CONNECTED) == 0) {
drw_shgroup_bone_relationship_lines(pchan->pose_head, pchan->parent->pose_tail);
/* Only draw if bone or its parent is selected - reduces viewport complexity with complex rigs */
if ((boneflag & BONE_SELECTED) ||
(pchan->parent->bone && (pchan->parent->bone->flag & BONE_SELECTED)))
{
if ((boneflag & BONE_CONNECTED) == 0) {
drw_shgroup_bone_relationship_lines(pchan->pose_head, pchan->parent->pose_tail);
}
}
/* Draw a line to IK root bone if bone is selected. */