Fix T77655 Overlay: Edit mode + wire drawtype + infront not transparent
This commit is contained in:
parent
2788b0261c
commit
e9d1d1f725
Notes:
blender-bot
2023-02-14 10:21:10 +01:00
Referenced by issue #77655, Edit mode + wire appearance + Infront have wrong shading (regression) Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -269,6 +269,7 @@ void OVERLAY_edit_mesh_cache_populate(OVERLAY_Data *vedata, Object *ob)
|
|||
OVERLAY_PrivateData *pd = vedata->stl->pd;
|
||||
struct GPUBatch *geom = NULL;
|
||||
|
||||
bool draw_as_solid = (ob->dt > OB_WIRE);
|
||||
bool do_in_front = (ob->dtx & OB_DRAWXRAY) != 0;
|
||||
bool do_occlude_wire = (pd->edit_mesh.flag & V3D_OVERLAY_EDIT_OCCLUDE_WIRE) != 0;
|
||||
bool do_show_mesh_analysis = (pd->edit_mesh.flag & V3D_OVERLAY_EDIT_STATVIS) != 0;
|
||||
|
@ -283,7 +284,7 @@ void OVERLAY_edit_mesh_cache_populate(OVERLAY_Data *vedata, Object *ob)
|
|||
}
|
||||
}
|
||||
|
||||
if (do_occlude_wire || do_in_front) {
|
||||
if (do_occlude_wire || (do_in_front && draw_as_solid)) {
|
||||
geom = DRW_cache_mesh_surface_get(ob);
|
||||
DRW_shgroup_call_no_cull(pd->edit_mesh_depth_grp[do_in_front], geom, ob);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue