Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2019-04-11 19:28:20 +0300
committerSebastian Parborg <darkdefende@gmail.com>2019-04-11 19:28:20 +0300
commitadaa7688ee77f4bce284b99ef5ac19a7c7a8ae42 (patch)
tree7b3dba7f17393d6be87f08086b946b085d4bd14d /source/blender/draw/modes/edit_mesh_mode.c
parent6b06440ed867189262034c26b483474fae670e60 (diff)
Fix T63467: Edge/vertex selection isnt working properly with X-ray set to 1
Edit mode shows the mesh elements in X-ray mode even if alpha is set to 1. Now the code takes this into account so that you can still select visible mesh elements in X-ray edit mode. view3d_draw_legacy need to be updated with the new XRAY flag macros to avoid crashes. Additional cleanup of the XRAY macro flags were done.
Diffstat (limited to 'source/blender/draw/modes/edit_mesh_mode.c')
-rw-r--r--source/blender/draw/modes/edit_mesh_mode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c
index 01bd43d9c6e..dedf7eac00a 100644
--- a/source/blender/draw/modes/edit_mesh_mode.c
+++ b/source/blender/draw/modes/edit_mesh_mode.c
@@ -387,7 +387,7 @@ static void EDIT_MESH_cache_init(void *vedata)
stl->g_data->do_faces = true;
stl->g_data->do_edges = true;
- stl->g_data->do_zbufclip = ((v3d)->shading.flag & XRAY_FLAG(v3d)) != 0;
+ stl->g_data->do_zbufclip = XRAY_FLAG_ENABLED(v3d);
stl->g_data->data_mask[0] = 0xFF; /* Face Flag */
stl->g_data->data_mask[1] = 0xFF; /* Edge Flag */
@@ -742,7 +742,7 @@ static void EDIT_MESH_draw_scene(void *vedata)
DRW_draw_pass(psl->normals);
DRW_draw_pass(psl->edit_face_overlay);
- if (v3d->shading.type == OB_SOLID && (v3d->shading.flag & XRAY_FLAG(v3d)) == 0 &&
+ if (v3d->shading.type == OB_SOLID && !XRAY_FLAG_ENABLED(v3d) &&
stl->g_data->ghost_ob == 1 && stl->g_data->edit_ob == 1)
{
/* In the case of single ghost object edit (common case for retopology):