diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-04-27 21:06:10 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-04-27 21:06:10 +0300 |
commit | ea757015295338397bf17bd76f949719bae9d954 (patch) | |
tree | e5c5383ec4c6cd60245a6220b980d50e47287528 /source/blender/draw | |
parent | 94c514cf34c745bd2865040245c7ab192290353b (diff) | |
parent | a1b1f2acd433e7e76cbb6111a6688277f7c1feaf (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/draw')
4 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c index 99929fd1b07..a9f0b0958fd 100644 --- a/source/blender/draw/engines/overlay/overlay_engine.c +++ b/source/blender/draw/engines/overlay/overlay_engine.c @@ -76,6 +76,8 @@ static void OVERLAY_engine_init(void *vedata) pd->overlay.flag |= V3D_OVERLAY_WIREFRAMES; } + pd->use_in_front = (v3d->shading.type <= OB_SOLID) || + BKE_scene_uses_blender_workbench(draw_ctx->scene); pd->wireframe_mode = (v3d->shading.type == OB_WIRE); pd->clipping_state = RV3D_CLIPPING_ENABLED(v3d, rv3d) ? DRW_STATE_CLIP_PLANES : 0; pd->xray_opacity = XRAY_ALPHA(v3d); diff --git a/source/blender/draw/engines/overlay/overlay_paint.c b/source/blender/draw/engines/overlay/overlay_paint.c index ccb309fdc4c..456c56f9c03 100644 --- a/source/blender/draw/engines/overlay/overlay_paint.c +++ b/source/blender/draw/engines/overlay/overlay_paint.c @@ -62,7 +62,8 @@ void OVERLAY_paint_init(OVERLAY_Data *vedata) OVERLAY_PrivateData *pd = stl->pd; const DRWContextState *draw_ctx = DRW_context_state_get(); - pd->painting.in_front = draw_ctx->obact && (draw_ctx->obact->dtx & OB_DRAWXRAY); + pd->painting.in_front = pd->use_in_front && draw_ctx->obact && + (draw_ctx->obact->dtx & OB_DRAWXRAY); pd->painting.alpha_blending = paint_object_is_rendered_transparent(draw_ctx->v3d, draw_ctx->obact); } diff --git a/source/blender/draw/engines/overlay/overlay_private.h b/source/blender/draw/engines/overlay/overlay_private.h index fa3d6fe3d8a..1870d9c7516 100644 --- a/source/blender/draw/engines/overlay/overlay_private.h +++ b/source/blender/draw/engines/overlay/overlay_private.h @@ -278,6 +278,7 @@ typedef struct OVERLAY_PrivateData { View3DOverlay overlay; enum eContextObjectMode ctx_mode; bool clear_in_front; + bool use_in_front; bool wireframe_mode; bool hide_overlays; bool xray_enabled; diff --git a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c index a7ddd1c547b..e2fd6e4d66a 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c +++ b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c @@ -151,11 +151,6 @@ static bool workbench_in_front_history_needed(WORKBENCH_Data *vedata) return false; } - if (!obact || draw_ctx->object_mode != OB_MODE_WEIGHT_PAINT || - v3d->overlay.weight_paint_mode_opacity == 0.0) { - return false; - } - return true; } |