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:
authorFalk David <falkdavid@gmx.de>2021-01-26 20:04:52 +0300
committerFalk David <falkdavid@gmx.de>2021-01-26 20:32:49 +0300
commitef28da262342447bd3a666f5069d6012d71e1781 (patch)
tree4b1cb25f6de5516b6dcb6210cc43d60f20d88793 /source/blender/editors/gpencil/gpencil_fill.c
parent6157c45445dceb0bceabb5b9ea80cd6eb60e04fc (diff)
Fix T85082: Perspective distortion while drawing
When the drawing plane was set to view and the user would pan their camera sideways, the drawing would be more and more distorted and projected further back. The fix projects the strokes to view when the user is looking through the camera or has the drawing plane set to view. Reviewed By: antoniov Maniphest Tasks: T85082 Differential Revision: https://developer.blender.org/D10213
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_fill.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_fill.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 84447059884..b8af8552a0d 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -1284,8 +1284,8 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
gpencil_apply_parent_point(tgpf->depsgraph, tgpf->ob, tgpf->gpl, pt);
}
- /* if camera view, reproject flat to view to avoid perspective effect */
- if (is_camera) {
+ /* If camera view or view projection, reproject flat to view to avoid perspective effect. */
+ if ((*p->align_flag & GP_PROJECT_VIEWSPACE) || is_camera) {
ED_gpencil_project_stroke_to_view(tgpf->C, tgpf->gpl, gps);
}