Outlines: Don't draw Xray mode outlines in material or render mode
This commit is contained in:
parent
45591cc0df
commit
4a2c58e077
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue