From 468f2ccc0ecbcb368aab950c61c2cc0bc95b27e1 Mon Sep 17 00:00:00 2001 From: Dave Pagurek Date: Fri, 16 Sep 2022 10:53:07 +0200 Subject: GPencil: Add more types of stroke extensions when filling The motivation for this change: while working on an animation recently, I found that there are some gaps that won't close easily via stroke extension or leak size checking. In D14698, I attempted to address this by changing the algorithm of the raster-space flood fill. This patch attempts to address the same issue in vector space by adding two new cases where stroke extensions are added, as suggested by @frogstomp: # **Points of high curvature:** when the curvature at a point is high enough that it's hard to visually distinguish between it and an endpoint, add a stroke extension out along the normal (pointing in the opposite direction of the stroke's acceleration.) This addresses cases where technically the endpoint points up, but there's a sharp corner right below it that should extend to connect. # **Stroke endpoints within a radius**: when two endpoints are close together, regardless of the angle they make, connect them if they are within a radius. This addresses cases like where the two endpoints have effectively parallel tangents, so extensions won't close the gap. Reviewed By: antoniov, mendio, frogstomp Differential Revision: https://developer.blender.org/D14809 --- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 78e7932433e..88add2a8f3b 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1605,6 +1605,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, "fill_extend_mode") + col.separator() row = col.row(align=True) row.prop(gp_settings, "extend_stroke_factor") -- cgit v1.2.3