Fix T81843 Bones invisible using Weight Paint + Wireframe shading + Bone X-Ray

This was caused by the paint overlay drawing after the infront pass.

Moving the paint overlay before it fixes the issue. We might even do
that for more mode overlays.
This commit is contained in:
Clément Foucault 2021-02-01 16:36:55 +01:00
parent bc41aaaaaa
commit d5d8655ca1
1 changed files with 5 additions and 1 deletions

View File

@ -598,6 +598,11 @@ static void OVERLAY_draw_scene(void *vedata)
OVERLAY_xray_depth_infront_copy(vedata);
if (pd->ctx_mode == CTX_MODE_PAINT_WEIGHT) {
/* Fix weird case where weightpaint mode needs to draw before xray bones. */
OVERLAY_paint_draw(vedata);
}
if (DRW_state_is_fbo()) {
GPU_framebuffer_bind(fbl->overlay_in_front_fb);
}
@ -648,7 +653,6 @@ static void OVERLAY_draw_scene(void *vedata)
OVERLAY_paint_draw(vedata);
OVERLAY_pose_draw(vedata);
break;
case CTX_MODE_PAINT_WEIGHT:
case CTX_MODE_PAINT_VERTEX:
case CTX_MODE_PAINT_TEXTURE:
OVERLAY_paint_draw(vedata);