[Bf-blender-cvs] [40229d2ab90] greasepencil-object: Include Thickness of new Fill Stroke
Antonio Vazquez
noreply at git.blender.org
Sun Jan 7 20:27:43 CET 2018
Commit: 40229d2ab9056eac29c579f21fe5f5bb25509e5e
Author: Antonio Vazquez
Date: Sun Jan 7 20:27:25 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB40229d2ab9056eac29c579f21fe5f5bb25509e5e
Include Thickness of new Fill Stroke
This parameter defines the thickness of the stroke created by fill operator.
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M source/blender/editors/gpencil/gpencil_fill.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 9e742e031f0..c2df4b8b4dc 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -383,7 +383,8 @@ class GreasePencilBrushPanel:
if brush.fill_only is True:
row = layout.row(align=True)
row.prop(brush, "fill_leak", text="Leak Size")
-
+ row = layout.row(align=True)
+ row.prop(brush, "line_width", text="Thickness")
row = layout.row(align=True)
row.prop(brush, "fill_simplyfy_lvl", text="Simplify")
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index dbe625d3271..9b86197e8d9 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -190,9 +190,11 @@ static void gp_draw_datablock(tGPDfill *tgpf, float ink[4])
ED_gp_draw_fill(&tgpw);
- /* 3D Lines - OpenGL primitives-based */
- gp_draw_basic_stroke(gps, tgpw.diff_mat, gps->flag & GP_STROKE_CYCLIC, ink,
- tgpf->flag, tgpf->fill_threshold);
+ /* 3D Lines with basic shapes and invisible lines */
+ if (tgpf->flag & GP_BRUSH_FILL_SHOW_BOUNDARY) {
+ gp_draw_basic_stroke(gps, tgpw.diff_mat, gps->flag & GP_STROKE_CYCLIC, ink,
+ tgpf->flag, tgpf->fill_threshold);
+ }
}
}
@@ -671,6 +673,12 @@ static void gpencil_stroke_from_stack(tGPDfill *tgpf)
{
Scene *scene = tgpf->scene;
ToolSettings *ts = tgpf->scene->toolsettings;
+ bGPDbrush *brush;
+ brush = BKE_gpencil_brush_getactive(ts);
+ if (brush == NULL) {
+ return;
+ }
+
bGPDspoint *pt;
tGPspoint point2D;
float r_out[3];
@@ -684,7 +692,7 @@ static void gpencil_stroke_from_stack(tGPDfill *tgpf)
/* create new stroke */
bGPDstroke *gps = MEM_callocN(sizeof(bGPDstroke), "bGPDstroke");
- gps->thickness = 1.0f;
+ gps->thickness = brush->thickness;
gps->inittime = 0.0f;
/* the polygon must be closed, so enabled cyclic */
More information about the Bf-blender-cvs
mailing list