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:
authorHans Goudey <h.goudey@me.com>2021-07-14 17:11:41 +0300
committerHans Goudey <h.goudey@me.com>2021-07-14 17:11:41 +0300
commit2acebcae24a6cb7cc5dcef6ddc437396e129da46 (patch)
tree1c902c7ee3dbaf1f3b4bde813e397047cfa0d90f /source/blender/editors/include
parent3de3c3c23a930943086ab9719f0abe5c069cc4b5 (diff)
Cleanup: Avoid duplication in line art stroke generation
The BKE_gpencil_stroke_add_points API function worked well for creating the primitives in the add object menu, but it expected a specific data format that doesn't make sense in a dynamic context. As evidence of that we can see the way source data was duplicated in the line art file just to use this API function. This commit solves that problem in two ways: - Clean up the line art function (this should make it faster too). - Move/rename the function so its intended use is more clear. Differential Revision: https://developer.blender.org/D11909
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_gpencil.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 59b5a1abaa6..8a8d91a570c 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -251,6 +251,13 @@ void ED_gpencil_brush_draw_eraser(struct Brush *brush, int x, int y);
/* ----------- Add Primitive Utilities -------------- */
+/* Number of values defining each point in the built-in data buffers for primitives. */
+#define GP_PRIM_DATABUF_SIZE 5
+void ED_gpencil_stroke_init_data(struct bGPDstroke *gps,
+ const float *array,
+ const int totpoints,
+ const float mat[4][4]);
+
void ED_gpencil_create_blank(struct bContext *C, struct Object *ob, float mat[4][4]);
void ED_gpencil_create_monkey(struct bContext *C, struct Object *ob, float mat[4][4]);
void ED_gpencil_create_stroke(struct bContext *C, struct Object *ob, float mat[4][4]);