diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-02-01 18:40:43 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-02-01 18:40:43 +0300 |
commit | 84dddf641edecb9de773ac7e07d18dab49b82db5 (patch) | |
tree | 4f599f3f3204d910b4b6950924e6086215993e07 /source/blender/draw/engines/overlay | |
parent | 5ec9e3a26e8cf69bf8a0845a6e51953b1d6bc801 (diff) | |
parent | d5d8655ca15c76d825c94627faae779bea3673d8 (diff) |
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source/blender/draw/engines/overlay')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_engine.c | 6 | ||||
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_grid.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c index fc9ec7ecc22..e9736402ae7 100644 --- a/source/blender/draw/engines/overlay/overlay_engine.c +++ b/source/blender/draw/engines/overlay/overlay_engine.c @@ -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); diff --git a/source/blender/draw/engines/overlay/overlay_grid.c b/source/blender/draw/engines/overlay/overlay_grid.c index 988c35e387a..87aa013f03a 100644 --- a/source/blender/draw/engines/overlay/overlay_grid.c +++ b/source/blender/draw/engines/overlay/overlay_grid.c @@ -232,7 +232,7 @@ void OVERLAY_grid_cache_init(OVERLAY_Data *vedata) DRW_shgroup_uniform_vec3(grp, "gridSize", shd->grid_size, 1); DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth); - if (shd->zneg_flag) { + if (shd->zneg_flag & SHOW_AXIS_Z) { DRW_shgroup_call(grp, geom, NULL); } @@ -251,7 +251,7 @@ void OVERLAY_grid_cache_init(OVERLAY_Data *vedata) DRW_shgroup_uniform_vec3(grp, "planeAxes", shd->zplane_axes, 1); DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo); DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth); - if (shd->zpos_flag) { + if (shd->zpos_flag & SHOW_AXIS_Z) { DRW_shgroup_call(grp, geom, NULL); } |