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:
authorMike Erwin <significant.bit@gmail.com>2016-10-18 20:12:40 +0300
committerMike Erwin <significant.bit@gmail.com>2016-10-18 20:12:40 +0300
commit117af2356a54063b294b8aacd2ba713526ef37f0 (patch)
treef3da4769a6ddf0c2b1f019a9ba43b7a231c3fbdf /source/blender/editors/gpencil/drawgpencil.c
parent46a069822a50a417fe74be100a3ce798f6ad6589 (diff)
skip drawing of gpencil strokes with overall thickness <= zero
Fixes an assert in drawing code. Might need further work to support variable-thickness strokes (from pressure-sensitive stylus). This all is due for geometry shader overhaul anyway.
Diffstat (limited to 'source/blender/editors/gpencil/drawgpencil.c')
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index c406a0d5ddc..181f85e0909 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1018,6 +1018,10 @@ static void gp_draw_strokes(
/* calculate thickness */
sthickness = gps->thickness + lthick;
+ if (sthickness <= 0) {
+ continue;
+ }
+
/* check which stroke-drawer to use */
if (dflag & GP_DRAWDATA_ONLY3D) {
const int no_xray = (dflag & GP_DRAWDATA_NO_XRAY);