diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-08-11 16:26:15 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-08-11 16:27:07 +0300 |
commit | 90baead9792be734d1e5755f8af7c93e8c6717e3 (patch) | |
tree | 16eb73ebc2459d4e697246d09b705a1c3739166d /source/blender/editors/gpencil/gpencil_intern.h | |
parent | 344a6a4b80facacf95ac612f41c590af65453052 (diff) |
GPencil: Split Primitive operators and add number of points to Topbar
Now the operators are split to define different default values. This is also required for the future Bezier primitive tools.
This allows to show in the Topbar the number of subdivisions. Before this value was totally hidden and it was number of Edges. The wheelmouse can be used to override the value while running, but does not change the default value.
{F8766270}
All operators share same code.
Also, fixed some bad practices done with Toolbar in python.
Reviewed By: mendio, pepeland
Differential Revision: https://developer.blender.org/D8506
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_intern.h')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_intern.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index fa75c2a7cee..e6fdbf1ad17 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -202,6 +202,8 @@ typedef struct tGPDprimitive { tGPspoint *points; /** number of edges allocated */ int point_count; + /** number of subdivisions. */ + int subdiv; /** stored number of polygon edges */ int tot_stored_edges; /** number of polygon edges */ @@ -553,7 +555,11 @@ void GPENCIL_OT_interpolate_reverse(struct wmOperatorType *ot); /* primitives ---------- */ -void GPENCIL_OT_primitive(struct wmOperatorType *ot); +void GPENCIL_OT_primitive_box(struct wmOperatorType *ot); +void GPENCIL_OT_primitive_line(struct wmOperatorType *ot); +void GPENCIL_OT_primitive_polyline(struct wmOperatorType *ot); +void GPENCIL_OT_primitive_circle(struct wmOperatorType *ot); +void GPENCIL_OT_primitive_curve(struct wmOperatorType *ot); /* vertex groups ------------ */ void GPENCIL_OT_vertex_group_assign(struct wmOperatorType *ot); |