diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-02-27 19:39:44 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-02-27 19:46:17 +0300 |
commit | 495216d2b8b4cb098a01a8dcbdc3d5235b59f5b3 (patch) | |
tree | 8ef994972e6169b372894ca173984461f7312503 | |
parent | 28ccc0fa2f148bac7d3ed3ebdbe2b2dfa5ee5efc (diff) |
Armature: Make selection only work on outlines in wireframe mode
This was not working in edit mode and broken in posemode + bounding box
display type.
This makes possible to select bones inside other bones.
-rw-r--r-- | source/blender/draw/modes/edit_armature_mode.c | 10 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/pose_mode.c | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/draw/modes/edit_armature_mode.c b/source/blender/draw/modes/edit_armature_mode.c index 4eaa9447efe..2c47667a4e9 100644 --- a/source/blender/draw/modes/edit_armature_mode.c +++ b/source/blender/draw/modes/edit_armature_mode.c @@ -132,6 +132,16 @@ static void EDIT_ARMATURE_draw_scene(void *vedata) DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get(); DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); + if (DRW_state_is_select()) { + DRW_draw_pass(psl->bone_outline[0]); + DRW_draw_pass(psl->bone_solid[0]); + DRW_draw_pass(psl->bone_wire[0]); + DRW_draw_pass(psl->bone_outline[1]); + DRW_draw_pass(psl->bone_solid[1]); + DRW_draw_pass(psl->bone_wire[1]); + return; + } + DRW_draw_pass(psl->bone_envelope[0]); /* For performance reason, avoid blending on MS target. */ diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 77fc75f2890..84c711aff60 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -3085,7 +3085,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) { if ((v3d->flag2 & V3D_RENDER_OVERRIDE) || (v3d->overlay.flag & V3D_OVERLAY_HIDE_BONES) || - (ob->dt < OB_WIRE)) + ((ob->dt < OB_WIRE) && !DRW_state_is_select())) { break; } diff --git a/source/blender/draw/modes/pose_mode.c b/source/blender/draw/modes/pose_mode.c index 69c613e7593..24a9a4753aa 100644 --- a/source/blender/draw/modes/pose_mode.c +++ b/source/blender/draw/modes/pose_mode.c @@ -260,8 +260,10 @@ static void POSE_draw_scene(void *vedata) const bool bone_selection_overlay = POSE_is_bone_selection_overlay_active(); if (DRW_state_is_select()) { + DRW_draw_pass(psl->bone_outline[0]); DRW_draw_pass(psl->bone_solid[0]); DRW_draw_pass(psl->bone_wire[0]); + DRW_draw_pass(psl->bone_outline[1]); DRW_draw_pass(psl->bone_solid[1]); DRW_draw_pass(psl->bone_wire[1]); return; |