[Bf-blender-cvs] [fdfa14e1aed] temp-gpencil-fill: GPencil: New parameter to extend strokes for fill
Antonio Vazquez
noreply at git.blender.org
Tue Feb 2 16:38:30 CET 2021
Commit: fdfa14e1aeda0ecd3138505893ebefd8a4719828
Author: Antonio Vazquez
Date: Tue Feb 2 16:15:25 2021 +0100
Branches: temp-gpencil-fill
https://developer.blender.org/rBfdfa14e1aeda0ecd3138505893ebefd8a4719828
GPencil: New parameter to extend strokes for fill
Still WIP, this commit is just the parameter
===================================================================
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
M source/blender/makesdna/DNA_brush_types.h
M source/blender/makesrna/intern/rna_brush.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 9f6433de991..9dc2f05eed2 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1446,6 +1446,10 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel):
row = col.row(align=True)
row.prop(gp_settings, "fill_layer_mode", text="Layers")
+ col.separator()
+ row = col.row(align=True)
+ row.prop(gp_settings, "extend_stroke_factor")
+
col.separator()
col.prop(gp_settings, "fill_simplify_level", text="Simplify")
if gp_settings.fill_draw_mode != 'STROKE':
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index e373500a0ed..5e359e4cd22 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -133,6 +133,10 @@ typedef struct BrushGpencilSettings {
/** Randomness for Value. */
float random_value;
+ /** Factor to extend stroke extremes using fill tool. */
+ float fill_extend_fac;
+ char _pad3[4];
+
struct CurveMapping *curve_sensitivity;
struct CurveMapping *curve_strength;
struct CurveMapping *curve_jitter;
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 05737bfa514..877b9a2d83d 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1608,6 +1608,15 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Value", "Random factor to modify original value");
RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
+ /* Factor to extend stroke extremes in Fill tool. */
+ prop = RNA_def_property(srna, "extend_stroke_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "fill_extend_fac");
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_float_default(prop, 0.0f);
+ RNA_def_property_ui_text(
+ prop, "Stroke Extension", "Strokes end extension for closing gaps, use zero to disable");
+ RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
+
/* Flags */
prop = RNA_def_property(srna, "use_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_PRESSURE);
More information about the Bf-blender-cvs
mailing list