diff options
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 17 | ||||
-rw-r--r-- | source/blender/draw/modes/pose_mode.c | 8 |
2 files changed, 11 insertions, 14 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 2ccbec788c0..3e7790b421f 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1605,12 +1605,12 @@ void DRW_draw_select_loop( obedit_mode = CTX_MODE_EDIT_ARMATURE; } } - bool use_bone_selection_overlay = false; if (v3d->overlay.flag &= V3D_OVERLAY_BONE_SELECTION) { if (!(v3d->flag2 &= V3D_RENDER_OVERRIDE)) { Object *obpose = OBPOSE_FROM_OBACT(obact); if (obpose) { - use_bone_selection_overlay = true; + use_obedit = true; + obedit_mode = CTX_MODE_POSE; } } } @@ -1628,17 +1628,8 @@ void DRW_draw_select_loop( drw_engines_enable_from_mode(obedit_mode); } else { - /* when in pose mode and overlays enable and bone selection overlay - active, switch order as the bone selection must have more precedence - than the rest of the scene */ - if (use_bone_selection_overlay) { - drw_engines_enable_from_object_mode(); - drw_engines_enable_basic(); - } - else { - drw_engines_enable_basic(); - drw_engines_enable_from_object_mode(); - } + drw_engines_enable_basic(); + drw_engines_enable_from_object_mode(); } /* Setup viewport */ diff --git a/source/blender/draw/modes/pose_mode.c b/source/blender/draw/modes/pose_mode.c index 084e9341d18..f138704cced 100644 --- a/source/blender/draw/modes/pose_mode.c +++ b/source/blender/draw/modes/pose_mode.c @@ -202,7 +202,7 @@ static void POSE_cache_populate(void *vedata, Object *ob) DRW_shgroup_armature_pose(ob, passes); } } - else if (ob->type == OB_MESH && POSE_is_bone_selection_overlay_active() && POSE_is_driven_by_active_armature(ob)) { + else if (ob->type == OB_MESH && !DRW_state_is_select() && POSE_is_bone_selection_overlay_active() && POSE_is_driven_by_active_armature(ob)) { struct Gwn_Batch *geom = DRW_cache_object_surface_get(ob); if (geom) { DRW_shgroup_call_object_add(stl->g_data->bone_selection_shgrp, geom, ob); @@ -244,6 +244,12 @@ static void POSE_draw_scene(void *vedata) const bool transparent_bones = (draw_ctx->v3d->overlay.arm_flag & V3D_OVERLAY_ARM_TRANSP_BONES) != 0; const bool bone_selection_overlay = POSE_is_bone_selection_overlay_active(); + if (DRW_state_is_select()) { + DRW_draw_pass(psl->bone_solid); + DRW_draw_pass(psl->bone_wire); + return; + } + if(bone_selection_overlay) { GPU_framebuffer_bind(dfbl->default_fb); DRW_draw_pass(psl->bone_selection); |