Fix T81950: GPencil - Draw - Stoke Placement Stroke Feature Broken

Buffer strokes weren't being the excluded from depth only draw calls
so were being included in depth tests. They are now excluded by
bypassing the creation of the buffer strokes.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D9742
This commit is contained in:
Jamell Moore 2020-12-08 16:48:11 +01:00 committed by Antonio Vazquez
parent d7cf464b49
commit 5b73083d4f
Notes: blender-bot 2023-02-13 20:46:31 +01:00
Referenced by issue #81950, Grease Pencil Ignores 'Stroke Placement: Stroke'
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ void GPENCIL_cache_init(void *ved)
pd->do_fast_drawing = false;
pd->obact = draw_ctx->obact;
if (pd->obact && pd->obact->type == OB_GPENCIL) {
if (pd->obact && pd->obact->type == OB_GPENCIL && !(pd->draw_depth_only)) {
/* Check if active object has a temp stroke data. */
bGPdata *gpd = (bGPdata *)pd->obact->data;
if (gpd->runtime.sbuffer_used > 0) {