diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-05-22 14:09:08 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-05-22 14:39:01 +0300 |
commit | 47b9d7494e6571eb716ddb073a6248b3fc32700b (patch) | |
tree | 9afd40c6f4865e8e8f319ed9224582c6ce3150b8 /source/blender | |
parent | e12df10120a0761031df6e33c0a6c212efd6a761 (diff) |
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).
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/intern/draw_armature.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c index d7cc5f0cac6..ed2b52700d9 100644 --- a/source/blender/draw/intern/draw_armature.c +++ b/source/blender/draw/intern/draw_armature.c @@ -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. */ |