Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYimingWu <xp8110@outlook.com>2022-02-22 07:54:35 +0300
committerYimingWu <xp8110@outlook.com>2022-02-22 07:54:35 +0300
commit2234bfbcdb14299aa2ed28ed3ee6682c6d9a7a0c (patch)
tree909692b6362d5c49e0908f397e78ceeb409da985 /source/blender/gpencil_modifiers
parent0f2e0a25e13d2d67f3d08d068ba11e255794bb6b (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.c3
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);