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:
authorFalk David <falkdavid@gmx.de>2020-12-12 18:34:38 +0300
committerFalk David <falkdavid@gmx.de>2020-12-12 18:49:38 +0300
commit3eb66494539b58d67b1605e76a070a97e910f124 (patch)
tree47f831795fca869e353c46e6de5008347a3d6275 /source/blender/blenkernel/BKE_gpencil_geom.h
parentae94a390a72763f2cd1d7108e723d153c549c310 (diff)
GPencil: Add uniform subdivide BKE to improve interpolation
This patch introduces a new BKE function that performs a uniform subdivide. The goal of this function is to subdivide the stroke to reach a target number of points while maintaining its shape, color, and weights. This is done by repeatedly subdividing the longest edge in the stroke. Every subdivision adds a new point at the exact middle point of an edge. The function is intended to be used in the interpolation operators to give better results when interpolating between different sized strokes. Reviewed By: antoniov Differential Revision: https://developer.blender.org/D9835
Diffstat (limited to 'source/blender/blenkernel/BKE_gpencil_geom.h')
-rw-r--r--source/blender/blenkernel/BKE_gpencil_geom.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil_geom.h b/source/blender/blenkernel/BKE_gpencil_geom.h
index b107a6e72af..111f9030463 100644
--- a/source/blender/blenkernel/BKE_gpencil_geom.h
+++ b/source/blender/blenkernel/BKE_gpencil_geom.h
@@ -164,6 +164,11 @@ bool BKE_gpencil_convert_mesh(struct Main *bmain,
const bool use_seams,
const bool use_faces);
+void BKE_gpencil_stroke_uniform_subdivide(struct bGPdata *gpd,
+ struct bGPDstroke *gps,
+ const uint32_t target_number,
+ const bool select);
+
#ifdef __cplusplus
}
#endif