From 240940c58ca3ce65e4bbceebea71dd9d1c2c08bc Mon Sep 17 00:00:00 2001 From: Antonioya Date: Mon, 15 Apr 2019 10:32:06 +0200 Subject: GPencil: New Dots gradient This commit adds support for drawing Dots strokes with a gradient factor to get artistic effects like watercolor. Currently, the option is only supported by Dots materials, and in the future will be added to line strokes, but now there is a limitation on drawing engine and we will keep disabled on Line materials. Also, added the option to align Dots and Boxes strokes textures aligned with the drawing path to get more fluid strokes. --- .../scripts/startup/bl_ui/properties_material_gpencil.py | 3 +++ release/scripts/startup/bl_ui/space_view3d_toolbar.py | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index 24ba786f7af..8cb59ceee5c 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -148,6 +148,9 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel): if gpcolor.stroke_style == 'SOLID' or gpcolor.use_stroke_pattern is True: col.prop(gpcolor, "color", text="Color") + if gpcolor.mode in {'DOTS', 'BOX'}: + col.prop(gpcolor, "use_follow_path", text="Follow Drawing Path") + class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel): bl_label = "Fill" diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 17dd35d9fc4..7c1fa0f9663 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1716,9 +1716,9 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel): layout.use_property_decorate = False brush = context.tool_settings.gpencil_paint.brush - gp_settings = brush.gpencil_settings if brush is not None: + gp_settings = brush.gpencil_settings col = layout.column(align=True) col.prop(gp_settings, "input_samples") col.separator() @@ -1728,7 +1728,20 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel): col.prop(gp_settings, "angle", slider=True) col.prop(gp_settings, "angle_factor", text="Factor", slider=True) + + ob = context.object + if ob: + ma = ob.active_material + + if brush.gpencil_settings.material: + ma = brush.gpencil_settings.material + col.separator() + subcol = col.column(align=True) + if ma and ma.grease_pencil.mode != 'DOTS': + subcol.enabled = False + subcol.prop(gp_settings, "gradient_factor", slider=True) + subcol.prop(gp_settings, "gradient_shape") class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(View3DPanel, Panel): -- cgit v1.2.3