diff options
author | YimingWu <xp8110@outlook.com> | 2022-02-22 07:54:35 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2022-02-22 07:54:35 +0300 |
commit | 2234bfbcdb14299aa2ed28ed3ee6682c6d9a7a0c (patch) | |
tree | 909692b6362d5c49e0908f397e78ceeb409da985 /source/blender/gpencil_modifiers | |
parent | 0f2e0a25e13d2d67f3d08d068ba11e255794bb6b (diff) |
GPencil: Simplify sample modifier improvements.
1. Now handles cyclic strokes correctly.
2. Added a sharp threshold value to allow preservation of sharp corners.
Reviewed By: Antonio Vazquez (antoniov), Aleš Jelovčan (frogstomp)
Ref D14044
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c index 3b7b82e3085..365b9afe348 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c @@ -88,7 +88,7 @@ static void deformStroke(GpencilModifierData *md, break; } case GP_SIMPLIFY_SAMPLE: { - BKE_gpencil_stroke_sample(gpd, gps, mmd->length, false); + BKE_gpencil_stroke_sample(gpd, gps, mmd->length, false, mmd->sharp_threshold); break; } case GP_SIMPLIFY_MERGE: { @@ -143,6 +143,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel) } else if (mode == GP_SIMPLIFY_SAMPLE) { uiItemR(layout, ptr, "length", 0, NULL, ICON_NONE); + uiItemR(layout, ptr, "sharp_threshold", 0, NULL, ICON_NONE); } else if (mode == GP_SIMPLIFY_MERGE) { uiItemR(layout, ptr, "distance", 0, NULL, ICON_NONE); |