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_primitive.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_primitive.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_primitive.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index ef86b19cc66..363d5d7ec17 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -1081,8 +1081,8 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
gpencil_apply_parent_point(tgpi->depsgraph, tgpi->ob, tgpi->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(C, tgpi->gpl, gps);
}