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:
authorAntonioya <blendergit@gmail.com>2019-02-28 17:58:03 +0300
committerAntonioya <blendergit@gmail.com>2019-02-28 19:13:05 +0300
commit0f37d7162b56ed6e81fe2be8beaf0b9afb21b470 (patch)
treef063999ae5fb9902d1885dcdd559b387de7e60c4
parent175cb0a0af9b9d165827f4f9d57f573e00f5cc55 (diff)
GPencil: Disable Outline if Overlay is disabled
The main overlay switch and outline option must be checked.
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index eeb9e809d6d..0903faf6a75 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -830,6 +830,7 @@ void GPENCIL_draw_scene(void *ved)
const bool is_render = stl->storage->is_render;
bGPdata *gpd_act = (obact) && (obact->type == OB_GPENCIL) ? (bGPdata *)obact->data : NULL;
const bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd_act);
+ const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) : true;
/* if the draw is for select, do a basic drawing and return */
if (DRW_state_is_select()) {
@@ -984,9 +985,11 @@ void GPENCIL_draw_scene(void *ved)
stl->storage->tonemapping = stl->storage->is_render ? 1 : 0;
/* active select flag and selection color */
- stl->storage->do_select = ((ob->base_flag & BASE_SELECTED) &&
+ stl->storage->do_select = ((overlay) &&
+ (ob->base_flag & BASE_SELECTED) &&
(ob->mode == OB_MODE_OBJECT) &&
- (!is_render) && (!playing));
+ (!is_render) && (!playing) &&
+ (v3d->flag & V3D_SELECT_OUTLINE));
/* if active object is not object mode, disable for all objects */
if ((draw_ctx->obact) && (draw_ctx->obact->mode != OB_MODE_OBJECT)) {