[Bf-blender-cvs] [47b9d7494e6] blender2.8: Experimental Armature Drawing Tweak for Relationship Lines

Joshua Leung noreply at git.blender.org
Tue May 22 13:39:16 CEST 2018


Commit: 47b9d7494e6571eb716ddb073a6248b3fc32700b
Author: Joshua Leung
Date:   Tue May 22 13:09:08 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB47b9d7494e6571eb716ddb073a6248b3fc32700b

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).

===================================================================

M	source/blender/draw/intern/draw_armature.c

===================================================================

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. */



More information about the Bf-blender-cvs mailing list