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-02 19:43:09 +0300
committerAntonioya <blendergit@gmail.com>2019-01-02 19:43:27 +0300
commit0ee97bd5c42bf64021819c8571f4e9346abb23b9 (patch)
tree3f283c9cd5f6411e6bdfae9f5126e634a4ffc982
parentd903eb6129fba1450e6c53c5b7eaa6b1c44ab7cf (diff)
Fix T60051: Wrong stroke projection when viewmode set to Front
As the z-depth is calculated using the internal drawing, if we use the front mode the z-depth is wrong. The Front or Back mode must be used only for display, but not for calculation.
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 5bb2d374c80..392c670696b 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -712,7 +712,8 @@ static void gp_draw_stroke_3d(tGPDdraw *tgpw, short thickness, const float ink[4
int keep_size = (int)((tgpw->gpd) && (tgpw->gpd->flag & GP_DATA_STROKE_KEEPTHICKNESS));
immUniform1i("keep_size", keep_size);
immUniform1i("pixfactor", tgpw->gpd->pixfactor);
- immUniform1i("xraymode", tgpw->gpd->xray_mode);
+ /* xray mode always to 3D space to avoid wrong zdepth calculation (T60051) */
+ immUniform1i("xraymode", GP_XRAY_3DSPACE);
/* draw stroke curve */
GPU_line_width(max_ff(curpressure * thickness, 1.0f));