[Bf-blender-cvs] [f916b43256a] master: Fix T60421: Bone heads are hidden when non-connected parent is hidden

Sebastian Parborg noreply at git.blender.org
Thu Mar 28 13:11:18 CET 2019


Commit: f916b43256a0a9cc351292be88616cde7a5ef5a8
Author: Sebastian Parborg
Date:   Thu Mar 28 13:09:16 2019 +0100
Branches: master
https://developer.blender.org/rBf916b43256a0a9cc351292be88616cde7a5ef5a8

Fix T60421: Bone heads are hidden when non-connected parent is hidden

The root point of a bone is now always drawn unless it is connected to an other bone.

Reviewed By: Clément Foucault

Differential Revision: http://developer.blender.org/D4194

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

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 13d9be9825e..b9b2a201c7d 100644
--- a/source/blender/draw/intern/draw_armature.c
+++ b/source/blender/draw/intern/draw_armature.c
@@ -1226,35 +1226,31 @@ static void draw_points(
 	bone_hint_color_shade(col_hint_root, (g_theme.const_color) ? col_solid_root : col_wire_root);
 	bone_hint_color_shade(col_hint_tail, (g_theme.const_color) ? col_solid_tail : col_wire_tail);
 
-	/*	Draw root point if we are not connected and parent are not hidden */
+	/* Draw root point if we are not connected to our parent */
 	if ((BONE_FLAG(eBone, pchan) & BONE_CONNECTED) == 0) {
 		if (select_id != -1) {
 			DRW_select_load_id(select_id | BONESEL_ROOT);
 		}
 
 		if (eBone) {
-			if (!((eBone->parent) && !EBONE_VISIBLE(arm, eBone->parent))) {
-				if (is_envelope_draw) {
-					drw_shgroup_bone_envelope(
-					        eBone->disp_mat, col_solid_root, col_hint_root, col_wire_root,
-					        &eBone->rad_head, &envelope_ignore, sh_cfg);
-				}
-				else {
-					drw_shgroup_bone_point(eBone->disp_mat, col_solid_root, col_hint_root, col_wire_root, sh_cfg);
-				}
+			if (is_envelope_draw) {
+				drw_shgroup_bone_envelope(
+						eBone->disp_mat, col_solid_root, col_hint_root, col_wire_root,
+						&eBone->rad_head, &envelope_ignore, sh_cfg);
+			}
+			else {
+				drw_shgroup_bone_point(eBone->disp_mat, col_solid_root, col_hint_root, col_wire_root, sh_cfg);
 			}
 		}
 		else {
 			Bone *bone = pchan->bone;
-			if (!((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)))) {
-				if (is_envelope_draw) {
-					drw_shgroup_bone_envelope(
-					        pchan->disp_mat, col_solid_root, col_hint_root, col_wire_root,
-					        &bone->rad_head, &envelope_ignore, sh_cfg);
-				}
-				else {
-					drw_shgroup_bone_point(pchan->disp_mat, col_solid_root, col_hint_root, col_wire_root, sh_cfg);
-				}
+			if (is_envelope_draw) {
+				drw_shgroup_bone_envelope(
+						pchan->disp_mat, col_solid_root, col_hint_root, col_wire_root,
+						&bone->rad_head, &envelope_ignore, sh_cfg);
+			}
+			else {
+				drw_shgroup_bone_point(pchan->disp_mat, col_solid_root, col_hint_root, col_wire_root, sh_cfg);
 			}
 		}
 	}
@@ -1376,16 +1372,13 @@ static void draw_bone_line(
 		col_wire = g_theme.wire_color;
 	}
 
-	/*	Draw root point if we are not connected and parent are not hidden */
+	/* Draw root point if we are not connected to our parent */
 	if ((BONE_FLAG(eBone, pchan) & BONE_CONNECTED) == 0) {
-		if (eBone && !(eBone->parent && !EBONE_VISIBLE(arm, eBone->parent))) {
+		if (eBone) {
 			col_head = (eBone->flag & BONE_ROOTSEL) ? g_theme.vertex_select_color : col_bone;
 		}
 		else if (pchan) {
-			Bone *bone = pchan->bone;
-			if (!(bone->parent && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)))) {
-				col_head = col_bone;
-			}
+			col_head = col_bone;
 		}
 	}



More information about the Bf-blender-cvs mailing list