diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-09-26 21:31:14 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-09-26 21:31:20 +0300 |
commit | 5732d9e1dcc08d284d7f9f56be22ad901fd53f22 (patch) | |
tree | b95990cabfe96e39b8a14883c6166e10bd9918fb /source/blender/draw/modes/overlay_mode.c | |
parent | ebd234eee5d7fdae6d7a5efa56171f6ab773a9e1 (diff) |
Wireframe/Xray: Make Xray option local to wireframe mode
This commit make the Xray option for the wireframe different from the other
shading mode. This makes it possible to rapidly switch between wireframe +
Xray and Solid mode without Xray.
Xray alpha is also decoupled.
Both variables are duplicated and exposed separately through RNA.
Diffstat (limited to 'source/blender/draw/modes/overlay_mode.c')
-rw-r--r-- | source/blender/draw/modes/overlay_mode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/modes/overlay_mode.c b/source/blender/draw/modes/overlay_mode.c index b28e400055e..3eef5a47288 100644 --- a/source/blender/draw/modes/overlay_mode.c +++ b/source/blender/draw/modes/overlay_mode.c @@ -290,7 +290,7 @@ static void overlay_cache_populate(void *vedata, Object *ob) GPUShader *sh = (all_wires) ? e_data.face_wireframe_sh : e_data.face_wireframe_pretty_sh; if ((DRW_state_is_select() || DRW_state_is_depth()) && - (v3d->shading.flag & V3D_SHADING_XRAY) != 0) + (v3d->shading.flag & XRAY_FLAG(v3d)) != 0) { static float params[2] = {1.2f, 1.0f}; /* Parameters for all wires */ @@ -332,7 +332,7 @@ static void overlay_cache_finish(void *vedata) View3D *v3d = ctx->v3d; /* only in solid mode */ - if (v3d->shading.type == OB_SOLID && (v3d->shading.flag & V3D_SHADING_XRAY) == 0) { + if (v3d->shading.type == OB_SOLID && (v3d->shading.flag & XRAY_FLAG(v3d)) == 0) { if (stl->g_data->ghost_stencil_test) { DRW_pass_state_add(psl->face_wireframe_pass, DRW_STATE_STENCIL_EQUAL); DRW_pass_state_add(psl->face_wireframe_full_pass, DRW_STATE_STENCIL_EQUAL); |