diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-06-16 22:05:24 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-06-17 00:28:39 +0300 |
commit | 4a2c58e0772fe026b2dbe6488672758e6dc439c4 (patch) | |
tree | cb3872f0019081acd6c8e6328fc42222173a6b7f /source/blender/draw | |
parent | 45591cc0dfc6065fa34697b93ef9b23b50f38b72 (diff) |
Outlines: Don't draw Xray mode outlines in material or render mode
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index f6fc58557f2..146e990500c 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -874,7 +874,8 @@ static void OBJECT_cache_init(void *vedata) DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); OBJECT_PrivateData *g_data; const DRWContextState *draw_ctx = DRW_context_state_get(); - const bool xray_enabled = ((draw_ctx->v3d->shading.flag & V3D_SHADING_XRAY) != 0); + const bool xray_enabled = ((draw_ctx->v3d->shading.flag & V3D_SHADING_XRAY) != 0) && + (draw_ctx->v3d->drawtype < OB_MATERIAL); /* TODO : use dpi setting for enabling the second pass */ const bool do_outline_expand = false; @@ -2110,7 +2111,9 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) if (do_outlines) { if ((ob != draw_ctx->object_edit) && !((ob == draw_ctx->obact) && (draw_ctx->object_mode & OB_MODE_ALL_PAINT))) { struct Gwn_Batch *geom; - if (v3d->shading.flag & V3D_SHADING_XRAY) { + const bool xray_enabled = ((v3d->shading.flag & V3D_SHADING_XRAY) != 0) && + (v3d->drawtype < OB_MATERIAL); + if (xray_enabled) { geom = DRW_cache_object_edge_detection_get(ob, NULL); } else { |