Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2019-03-28 15:09:16 +0300
committerSebastian Parborg <darkdefende@gmail.com>2019-03-28 15:09:16 +0300
commitf916b43256a0a9cc351292be88616cde7a5ef5a8 (patch)
tree893a92563da18dd945858bcad63f6060272443db /source/blender/draw/intern/draw_armature.c
parent0403a2f78502193646506f6c9c4529d40af2bc19 (diff)
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
Diffstat (limited to 'source/blender/draw/intern/draw_armature.c')
-rw-r--r--source/blender/draw/intern/draw_armature.c43
1 files changed, 18 insertions, 25 deletions
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;
}
}