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/blenkernel/BKE_gpencil_geom.h
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/blenkernel/BKE_gpencil_geom.h')
-rw-r--r--source/blender/blenkernel/BKE_gpencil_geom.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil_geom.h b/source/blender/blenkernel/BKE_gpencil_geom.h
index 29e3a74b1b2..d472fd6f02b 100644
--- a/source/blender/blenkernel/BKE_gpencil_geom.h
+++ b/source/blender/blenkernel/BKE_gpencil_geom.h
@@ -101,7 +101,7 @@ bool BKE_gpencil_stroke_sample(struct bGPdata *gpd,
struct bGPDstroke *gps,
const float dist,
const bool select);
-bool BKE_gpencil_stroke_smooth(struct bGPDstroke *gps, int i, float inf);
+bool BKE_gpencil_stroke_smooth_point(struct bGPDstroke *gps, int i, float inf);
bool BKE_gpencil_stroke_smooth_strength(struct bGPDstroke *gps, int point_index, float influence);
bool BKE_gpencil_stroke_smooth_thickness(struct bGPDstroke *gps, int point_index, float influence);
bool BKE_gpencil_stroke_smooth_uv(struct bGPDstroke *gps, int point_index, float influence);
@@ -151,7 +151,8 @@ void BKE_gpencil_stroke_set_random_color(struct bGPDstroke *gps);
void BKE_gpencil_stroke_join(struct bGPDstroke *gps_a,
struct bGPDstroke *gps_b,
const bool leave_gaps,
- const bool fit_thickness);
+ const bool fit_thickness,
+ const bool smooth);
void BKE_gpencil_stroke_copy_to_keyframes(struct bGPdata *gpd,
struct bGPDlayer *gpl,
struct bGPDframe *gpf,