diff options
author | Antonioya <blendergit@gmail.com> | 2019-02-24 18:03:03 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-02-24 18:03:03 +0300 |
commit | ccfda7dc2c5d7fe26f0461df2c8209fa6698f9c3 (patch) | |
tree | 4b1b95487f50d7ef11305332a941db3192481116 /source | |
parent | 20dfa8aa2856a4cd35e76010dcd5023d4c7dbe82 (diff) |
GP: Disable Onion calculation when Overlay is OFF
Now, it's not required to disable the Onion in Overlay panel.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_draw_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 2e9a3cf1fc7..816bc554bc7 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -69,8 +69,9 @@ static void gpencil_calc_vertex( const DRWContextState *draw_ctx = DRW_context_state_get(); const bool main_onion = draw_ctx->v3d != NULL ? (draw_ctx->v3d->gp_flag & V3D_GP_SHOW_ONION_SKIN) : true; const bool playing = stl->storage->is_playing; + const bool overlay = draw_ctx->v3d != NULL ? (bool)((draw_ctx->v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) : true; const bool do_onion = (bool)((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) == 0) && - main_onion && DRW_gpencil_onion_active(gpd) && !playing; + overlay && main_onion && DRW_gpencil_onion_active(gpd) && !playing; const bool time_remap = BKE_gpencil_has_time_modifiers(ob); const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd); |