From 0845b1c8c8da818607fcff0a1bdb2114a0cb9729 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Thu, 30 Aug 2018 11:06:44 +0200 Subject: GP: Improve Subdivide and Simplify Now the weights are managed in the operators. The subdivide operator and modifier code have been replaced with a shared function. Some cleanup also. --- source/blender/blenkernel/BKE_gpencil.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'source/blender/blenkernel/BKE_gpencil.h') diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h index 0aa7a0de7e6..aad02c371db 100644 --- a/source/blender/blenkernel/BKE_gpencil.h +++ b/source/blender/blenkernel/BKE_gpencil.h @@ -26,10 +26,10 @@ #ifndef __BKE_GPENCIL_H__ #define __BKE_GPENCIL_H__ -/** \file BKE_gpencil.h - * \ingroup bke - * \author Joshua Leung - */ + /** \file BKE_gpencil.h + * \ingroup bke + * \author Joshua Leung + */ struct CurveMapping; struct Depsgraph; @@ -106,9 +106,9 @@ void BKE_gpencil_stats_update(struct bGPdata *gpd); #define GP_PRIM_DATABUF_SIZE 5 void BKE_gpencil_stroke_add_points( - struct bGPDstroke *gps, - const float *array, const int totpoints, - const float mat[4][4]); + struct bGPDstroke *gps, + const float *array, const int totpoints, + const float mat[4][4]); struct bGPDstroke *BKE_gpencil_add_stroke(struct bGPDframe *gpf, int mat_idx, int totpoints, short thickness); @@ -144,8 +144,8 @@ struct Material *BKE_gpencil_material_ensure(struct Main *bmain, struct Object * /* object boundbox */ bool BKE_gpencil_stroke_minmax( - const struct bGPDstroke *gps, const bool use_select, - float r_min[3], float r_max[3]); + const struct bGPDstroke *gps, const bool use_select, + float r_min[3], float r_max[3]); struct BoundBox *BKE_gpencil_boundbox_get(struct Object *ob); void BKE_gpencil_centroid_3D(struct bGPdata *gpd, float r_centroid[3]); @@ -162,6 +162,7 @@ void BKE_gpencil_eval_geometry(struct Depsgraph *depsgraph, struct bGPdata *gpd) void BKE_gpencil_stroke_normal(const struct bGPDstroke *gps, float r_normal[3]); void BKE_gpencil_simplify_stroke(struct bGPDstroke *gps, float factor); void BKE_gpencil_simplify_fixed(struct bGPDstroke *gps); +void BKE_gpencil_subdivide(struct bGPDstroke *gps, int level, int flag); void BKE_gpencil_transform(struct bGPdata *gpd, float mat[4][4]); -- cgit v1.2.3