diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-09-21 16:44:04 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-09-21 16:45:03 +0300 |
commit | 37fea2c0f0bb57b91595784af57d89259e9301ba (patch) | |
tree | d947392b26f4a3f23019a66e101ed6105f63eb7b /source/blender/draw/modes/edit_mesh_mode.c | |
parent | 3523958de9f129e260a8a31260ef9459a10cc3cc (diff) |
Edit Mode: Merge Xray and "Limit selection to visible" options behaviour
We now treat Xray as being the mode where Limit selection to visible is off.
If Xray is OFF, Limit selection to visible is considered ON.
To allow 'see through wires' with solid shading (not Xray shading) we still
draw solid shading if Xray is ON with Xray Alpha set to 1.0.
Diffstat (limited to 'source/blender/draw/modes/edit_mesh_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 30049bd701a..4cf99ef3c1e 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -393,9 +393,7 @@ static void EDIT_MESH_cache_init(void *vedata) stl->g_data->do_faces = true; stl->g_data->do_edges = true; - const bool xray_enabled = ((draw_ctx->v3d->shading.flag & V3D_SHADING_XRAY) != 0) && - (draw_ctx->v3d->shading.type < OB_MATERIAL); - stl->g_data->do_zbufclip = ((v3d->flag & V3D_ZBUF_SELECT) == 0) || xray_enabled; + stl->g_data->do_zbufclip = ((v3d)->shading.flag & V3D_SHADING_XRAY) != 0; /* Applies on top of the theme edge width, so edge-mode can have thick edges. */ stl->g_data->edge_width_scale = (tsettings->selectmode & (SCE_SELECT_EDGE)) ? 1.75f : 1.0f; |