diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-02-21 16:04:20 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-02-21 16:09:52 +0300 |
commit | 813dcb9febad5d6927cefb3d8ff84b21f7766ad5 (patch) | |
tree | 8633a5a249b46b0bb173eb9e66a21e8cb08fa2cc /source/blender/editors/gpencil | |
parent | 6ec05eb3e6aad4f774863c64b59bbbdce8da0ad5 (diff) |
GPencil: Another fix for the "big square dots" problem
Strokes containing only a single point are now drawn so that they respect the
pressure values too. Previously, they were getting drawn at a fixed size based
on the thickness of strokes. Thanks to @kekeljevic for posting a screenshot which
made the problem here easy to identify!
(On a side note: Perhaps it's a combination of the drivers I'm using, or the
multisampling goodness at work, but after applying this change, the dots are
now appearing as round circles as originally intended, and can also be scaled
up quite a bit too. And that's for 3D points which couldn't be affected like
this earlier! I'm not sure what's going on here, but whatever it is, I like it ;)
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 20279caaf7c..55224b87c59 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -363,6 +363,9 @@ static void gp_draw_stroke_fill(bGPDspoint *points, int totpoints, short UNUSED( static void gp_draw_stroke_point(bGPDspoint *points, short thickness, short dflag, short sflag, int offsx, int offsy, int winx, int winy) { + /* set point thickness (since there's only one of these) */ + glPointSize((float)(thickness + 2) * points->pressure); + /* draw point */ if (sflag & GP_STROKE_3DSPACE) { glBegin(GL_POINTS); @@ -966,9 +969,8 @@ static void gp_draw_data_layers(bGPdata *gpd, int offsx, int offsy, int winx, in if (gpf == NULL) continue; - /* set color, stroke thickness, and point size */ + /* set basic stroke thickness */ glLineWidth(lthick); - glPointSize((float)(gpl->thickness + 2)); /* Add layer drawing settings to the set of "draw flags" * NOTE: If the setting doesn't apply, it *must* be cleared, |