Merge branch 'blender-v2.83-release'

This commit is contained in:
Clément Foucault 2020-04-27 20:06:10 +02:00
commit ea75701529
4 changed files with 5 additions and 6 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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;

View File

@ -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;
}