From 72989f9d0b67373a6eb47c08a51fa26a239b03fe Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 12 Feb 2021 15:23:47 +0100 Subject: Fix T85581: GPencil draw on surface does not work The problem was the stroke was reproject flat to view if the axis was View. Now, if the operation is using depth, the stroke is not reprojected. Related to T85082 --- source/blender/editors/gpencil/gpencil_paint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/gpencil/gpencil_paint.c') diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index ed56f004ca4..889aea84c97 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1085,7 +1085,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p) } /* If camera view or view projection, reproject flat to view to avoid perspective effect. */ - if (((align_flag & GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || is_camera) { + if ((!is_depth) && ((align_flag & GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || is_camera) { ED_gpencil_project_stroke_to_view(p->C, p->gpl, gps); } } @@ -1234,7 +1234,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p) /* change position relative to parent object */ gpencil_apply_parent(depsgraph, obact, gpl, gps); /* If camera view or view projection, reproject flat to view to avoid perspective effect. */ - if (((align_flag & GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || is_camera) { + if ((!is_depth) && ((align_flag & GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || is_camera) { ED_gpencil_project_stroke_to_view(p->C, p->gpl, gps); } -- cgit v1.2.3