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:
authorAntonioya <blendergit@gmail.com>2019-01-01 18:44:10 +0300
committerAntonioya <blendergit@gmail.com>2019-01-01 18:44:10 +0300
commit4dd0a90f421387e6362315c294033f59dc94c0b6 (patch)
tree8507a99473326730d4b639ca8a19decc5bdb29e2 /source/blender/editors/gpencil
parent4d795cee4938f080f83aa367272d1ad25bba1fbd (diff)
GP: Don't use offset for Stroke projection
The offset is only used in Surface mode.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 9ec35105afd..ff9678550f9 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -370,7 +370,10 @@ static void gp_stroke_convertcoords(tGPsdata *p, const float mval[2], float out[
if (gpd->runtime.sbuffer_sflag & GP_STROKE_3DSPACE) {
/* add small offset to keep stroke over the surface */
- if ((depth) && (gpd->zdepth_offset > 0.0f)) {
+ if ((depth) &&
+ (gpd->zdepth_offset > 0.0f) &&
+ (*p->align_flag & GP_PROJECT_DEPTH_VIEW))
+ {
*depth *= (1.0f - gpd->zdepth_offset);
}