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.
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user