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:
authorAntonio Vazquez <blendergit@gmail.com>2021-09-03 16:24:01 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-09-03 16:24:13 +0300
commitae334532cffb2dd9074454b9a7ba095430f18735 (patch)
treea417085b903fb1849b14a70946225a08a479f786 /source/blender/editors/gpencil/gpencil_interpolate.c
parentf9ccd26b037d43f2490d1f0263e45e775d30473d (diff)
GPencil: Smooth thickness when joining strokes
When joining two strokes in paint mode using the auto merge option, the join was very hard if the thickness was too different. This patch adds a smooth to the join in order to get better transition. Also fixed the problem to join existing strokes very far from actual stroke. Some cleanup and rename of old code is included in order to make code more readable. Reviewed By: pepeland Differential Revision: https://developer.blender.org/D12362
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_interpolate.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_interpolate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index a8bd3b11bb1..fdd9f44605e 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -333,7 +333,7 @@ static void gpencil_interpolate_smooth_stroke(bGPDstroke *gps,
float reduce = 0.0f;
for (int r = 0; r < smooth_steps; r++) {
for (int i = 0; i < gps->totpoints - 1; i++) {
- BKE_gpencil_stroke_smooth(gps, i, smooth_factor - reduce);
+ BKE_gpencil_stroke_smooth_point(gps, i, smooth_factor - reduce);
BKE_gpencil_stroke_smooth_strength(gps, i, smooth_factor);
}
reduce += 0.25f; /* reduce the factor */