diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-10-29 19:40:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-10-29 19:40:03 +0300 |
commit | 77acda6fd026d78e6e35ae0e0985280f4cf886c1 (patch) | |
tree | eb8da3266a015df9868629adf83e937c96f23035 /source/blender/draw | |
parent | 81cc09b78a12bcbbe7552dd02f47010775fc8b62 (diff) | |
parent | f20cd49c30834401e438dbd0675b6d41ab4d25c5 (diff) |
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/draw_armature.c | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c index 5cd6a4a1286..e16dfb5004b 100644 --- a/source/blender/draw/intern/draw_armature.c +++ b/source/blender/draw/intern/draw_armature.c @@ -1350,7 +1350,8 @@ static void draw_points(const EditBone *eBone, 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 to our parent */ - if ((BONE_FLAG(eBone, pchan) & BONE_CONNECTED) == 0) { + if (!(eBone ? (eBone->parent && (eBone->flag & BONE_CONNECTED)) : + (pchan->bone->parent && (pchan->bone->flag & BONE_CONNECTED)))) { if (select_id != -1) { DRW_select_load_id(select_id | BONESEL_ROOT); } @@ -1518,29 +1519,32 @@ static void draw_bone_line(EditBone *eBone, const float *col_head = no_display; const float *col_tail = col_bone; - if (eBone) { - if (eBone->flag & BONE_TIPSEL) { - col_tail = g_theme.vertex_select_color; - } - if (boneflag & BONE_SELECTED) { - col_bone = g_theme.edge_select_color; - } - col_wire = g_theme.wire_color; + if (g_theme.const_color != NULL) { + col_wire = no_display; /* actually shrink the display. */ + col_bone = col_head = col_tail = g_theme.const_color; } - - /* Draw root point if we are not connected to our parent */ - if ((BONE_FLAG(eBone, pchan) & BONE_CONNECTED) == 0) { + else { if (eBone) { - col_head = (eBone->flag & BONE_ROOTSEL) ? g_theme.vertex_select_color : col_bone; - } - else if (pchan) { - col_head = col_bone; + if (eBone->flag & BONE_TIPSEL) { + col_tail = g_theme.vertex_select_color; + } + if (boneflag & BONE_SELECTED) { + col_bone = g_theme.edge_select_color; + } + col_wire = g_theme.wire_color; } - } - if (g_theme.const_color != NULL) { - col_wire = no_display; /* actually shrink the display. */ - col_bone = col_head = col_tail = g_theme.const_color; + /* Draw root point if we are not connected to our parent. */ + if (!(eBone ? (eBone->parent && (eBone->flag & BONE_CONNECTED)) : + (pchan->bone->parent && (pchan->bone->flag & BONE_CONNECTED)))) { + + if (eBone) { + col_head = (eBone->flag & BONE_ROOTSEL) ? g_theme.vertex_select_color : col_bone; + } + else { + col_head = col_bone; + } + } } if (select_id == -1) { |