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/blenkernel/BKE_gpencil_geom.h | |
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/blenkernel/BKE_gpencil_geom.h')
-rw-r--r-- | source/blender/blenkernel/BKE_gpencil_geom.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil_geom.h b/source/blender/blenkernel/BKE_gpencil_geom.h index eb61bd32eee..4127030e96f 100644 --- a/source/blender/blenkernel/BKE_gpencil_geom.h +++ b/source/blender/blenkernel/BKE_gpencil_geom.h @@ -208,11 +208,13 @@ void BKE_gpencil_point_coords_apply_with_mat4(struct bGPdata *gpd, * \param gpd: Grease pencil data-block * \param gps: Stroke to sample * \param dist: Distance of one segment + * \param sharp_threshold: Threshold for preserving sharp corners */ bool BKE_gpencil_stroke_sample(struct bGPdata *gpd, struct bGPDstroke *gps, - float dist, - bool select); + const float dist, + const bool select, + const float sharp_threshold); /** * Apply smooth position to stroke point. * \param gps: Stroke to smooth |