[Bf-blender-cvs] [25b17449814] greasepencil-object: GPencil: When convert curve do not enable Stroke always
Antonio Vazquez
noreply at git.blender.org
Tue Aug 20 12:13:05 CEST 2019
Commit: 25b17449814066d43200b0ec047df256aa6322e4
Author: Antonio Vazquez
Date: Tue Aug 20 12:12:57 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rB25b17449814066d43200b0ec047df256aa6322e4
GPencil: When convert curve do not enable Stroke always
When the converted curve has only fill, the stroke must be set to off.
===================================================================
M source/blender/blenkernel/intern/gpencil.c
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 795b2bbed3d..ee69a423761 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2875,9 +2875,11 @@ static Material *gpencil_add_from_curve_material(Main *bmain,
/* Stroke color. */
if (gpencil_lines) {
ARRAY_SET_ITEMS(gp_style->stroke_rgba, 0.0f, 0.0f, 0.0f, 1.0f);
+ gp_style->flag |= GP_STYLE_STROKE_SHOW;
}
else {
linearrgb_to_srgb_v4(gp_style->stroke_rgba, cu_color);
+ gp_style->flag &= ~GP_STYLE_STROKE_SHOW;
}
/* Fill color. */
@@ -3029,7 +3031,9 @@ static void gpencil_convert_spline(Main *bmain,
ma_stroke = give_current_material(ob_cu, 1);
linearrgb_to_srgb_v3_v3(mat_gp->gp_style->stroke_rgba, &ma_stroke->r);
mat_gp->gp_style->stroke_rgba[3] = ma_stroke->a;
- /* set fill to off. */
+ /* Set stroke to on. */
+ mat_gp->gp_style->flag |= GP_STYLE_STROKE_SHOW;
+ /* Set fill to off. */
mat_gp->gp_style->flag &= ~GP_STYLE_FILL_SHOW;
}
}
More information about the Bf-blender-cvs
mailing list