diff options
author | Dave Pagurek <davepagurek> | 2022-09-16 11:53:07 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-09-17 13:30:13 +0300 |
commit | 468f2ccc0ecbcb368aab950c61c2cc0bc95b27e1 (patch) | |
tree | dc8b33cda00710764478f574967b88a74578316a /release/scripts/startup | |
parent | a4027658eeaff868a68675594bf774a87454344e (diff) |
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
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 4 |
1 files changed, 4 insertions, 0 deletions
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 @@ -1607,6 +1607,10 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel): 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") row.prop( gp_settings, |