diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-03-27 16:52:13 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-03-27 16:53:15 +0300 |
commit | 27b73f0c5b8ba23e069abf107716929f106969b8 (patch) | |
tree | 204612cb979a12365892a31ae3c02c6047c4725c /source/blender/draw/engines/gpencil | |
parent | c87e467e390ab97ed156ee0aa5cf22eb26ae78a7 (diff) |
GPencil: Remove legacy `ED_gpencil_draw_view3d` code.
Differential Revision: https://developer.blender.org/D4598
Diffstat (limited to 'source/blender/draw/engines/gpencil')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_engine.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 3bee7d0d51c..781fbabccb7 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -414,7 +414,8 @@ void GPENCIL_cache_init(void *vedata) bGPdata *gpd_orig = (bGPdata *)DEG_get_original_id(&obact_gpd->id); if (((gpd_orig->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0) && (gpd_orig->runtime.sbuffer_size > 0) && - ((gpd_orig->flag & GP_DATA_STROKE_POLYGON) == 0)) + ((gpd_orig->flag & GP_DATA_STROKE_POLYGON) == 0) && + !DRW_state_is_depth()) { stl->g_data->session_flag |= GP_DRW_PAINT_PAINTING; } @@ -710,7 +711,7 @@ void GPENCIL_cache_finish(void *vedata) } /* create framebuffers (only for normal drawing) */ - if (!DRW_state_is_select()) { + if (!DRW_state_is_select() || !DRW_state_is_depth()) { GPENCIL_create_framebuffers(vedata); } } @@ -864,7 +865,7 @@ void GPENCIL_draw_scene(void *ved) const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) : true; /* if the draw is for select, do a basic drawing and return */ - if (DRW_state_is_select()) { + if (DRW_state_is_select() || DRW_state_is_depth()) { drw_gpencil_select_render(stl, psl); /* free memory */ gpencil_free_obj_runtime(stl); |