[Bf-blender-cvs] [6871f7bca29] greasepencil-object: GP: Fill: Reduce stroke thickness to minimum
Charlie Jolly
noreply at git.blender.org
Tue Jan 15 00:03:32 CET 2019
Commit: 6871f7bca29739b5efc366c1b9025f19c4fdf2a6
Author: Charlie Jolly
Date: Mon Jan 14 23:03:16 2019 +0000
Branches: greasepencil-object
https://developer.blender.org/rB6871f7bca29739b5efc366c1b9025f19c4fdf2a6
GP: Fill: Reduce stroke thickness to minimum
Sets flag when using the fill tool to reduce strokes to minimum. This helps reduce white areas.
===================================================================
M source/blender/editors/gpencil/drawgpencil.c
M source/blender/editors/gpencil/gpencil_fill.c
M source/blender/editors/gpencil/gpencil_intern.h
===================================================================
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 392c670696b..b671eaf4df0 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1418,7 +1418,7 @@ static void gp_draw_data_layers(RegionView3D *rv3d,
/* calculate parent position */
ED_gpencil_parent_location(tgpw.depsgraph, ob, gpd, gpl, diff_mat);
- short lthick = brush->size + gpl->line_change;
+ short lthick = (tgpw.is_fill_tool) ? 1 : brush->size + gpl->line_change;
/* don't draw layer if hidden */
if (gpl->flag & GP_LAYER_HIDE)
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 23211009b36..9b7c97c1839 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -255,6 +255,7 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4])
tgpw.t_gpf = gpf;
/* reduce thickness to avoid gaps */
+ tgpw.is_fill_tool = true;
tgpw.lthick = gpl->line_change - 4;
tgpw.opacity = 1.0;
copy_v4_v4(tgpw.tintcolor, ink);
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index 56ddf81f357..810d7a5fb86 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -99,6 +99,7 @@ typedef struct tGPDdraw {
float tintcolor[4]; /* tint color */
bool onion; /* onion flag */
bool custonion; /* use custom onion colors */
+ bool is_fill_tool; /* use fill tool */
float diff_mat[4][4]; /* matrix */
} tGPDdraw;
More information about the Bf-blender-cvs
mailing list