From 505340202e960776f694ccfc7ed2c959c38a02c1 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Sat, 31 Aug 2019 17:26:48 +0200 Subject: Fix T66452: Convert Curve to Grease Pencil Strokes This commit adds support to convert curves to Grease Pencil strokes and create the materials too. Also, there is a new python API. This API is required by the modified SVG import addon to create strokes( see T67065). All curves selected in one operation are converted in the same Grease Pencil object. --- source/blender/blenkernel/BKE_gpencil.h | 8 ++++++++ 1 file changed, 8 insertions(+) (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 75e98ee31de..310eba86231 100644 --- a/source/blender/blenkernel/BKE_gpencil.h +++ b/source/blender/blenkernel/BKE_gpencil.h @@ -237,6 +237,14 @@ void BKE_gpencil_get_range_selected(struct bGPDlayer *gpl, int *r_initframe, int float BKE_gpencil_multiframe_falloff_calc( struct bGPDframe *gpf, int actnum, int f_init, int f_end, struct CurveMapping *cur_falloff); +void BKE_gpencil_convert_curve(struct Main *bmain, + struct Scene *scene, + struct Object *ob_gp, + struct Object *ob_cu, + const bool gpencil_lines, + const bool use_collections, + const bool only_stroke); + extern void (*BKE_gpencil_batch_cache_dirty_tag_cb)(struct bGPdata *gpd); extern void (*BKE_gpencil_batch_cache_free_cb)(struct bGPdata *gpd); -- cgit v1.2.3