diff options
author | Juanfran Matheu <jfmatheu> | 2020-05-06 12:38:32 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-05-06 16:58:12 +0300 |
commit | 668dd146f6475f97339aff3d80d019af4d816ee1 (patch) | |
tree | aa9c7e052ab60e1095751fc8f791712687d68a9f /source/blender/makesdna/DNA_gpencil_types.h | |
parent | 969d6b157ee1c3d489c962d4aeb74ec490f7405a (diff) |
Annotations: Add different arrow styles for line tool
This patch adds different kind of shapes/styles for the line extremes while using the annotation line tool.
Current Styles: (following @mendio mockup)
- Arrow (closed arrow)
- Open Arrow
- Segment
- Square
For future it would be great to have icons, it would be more intuitive (and less space) with previews of what each end / start of line does, like the google slides one as reference:
{F8511116}
Reviewed By: #grease_pencil, antoniov, HooglyBoogly
Differential Revision: https://developer.blender.org/D7608
Diffstat (limited to 'source/blender/makesdna/DNA_gpencil_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_types.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index bf9f228b53f..cfc9324a100 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -264,6 +264,10 @@ typedef enum eGPDstroke_Flag { /* Flag used to indicate that stroke is used for fill close and must use * fill color for stroke and no fill area */ GP_STROKE_NOFILL = (1 << 8), + /* only for use with stroke-buffer (while drawing arrows) */ + GP_STROKE_USE_ARROW_START = (1 << 12), + /* only for use with stroke-buffer (while drawing arrows) */ + GP_STROKE_USE_ARROW_END = (1 << 13), /* Tag for update geometry */ GP_STROKE_TAG = (1 << 14), /* only for use with stroke-buffer (while drawing eraser) */ @@ -280,6 +284,17 @@ typedef enum eGPDstroke_Caps { GP_STROKE_CAP_MAX, } GPDstroke_Caps; +/* Arrows ----------------------- */ + +/* bGPDataRuntime.arrowstyle */ +typedef enum eGPDstroke_Arrowstyle { + GP_STROKE_ARROWSTYLE_NONE = 0, + GP_STROKE_ARROWSTYLE_SEGMENT = 2, + GP_STROKE_ARROWSTYLE_OPEN = 3, + GP_STROKE_ARROWSTYLE_CLOSED = 4, + GP_STROKE_ARROWSTYLE_SQUARE = 6, +} eGPDstroke_Arrowstyle; + /* ***************************************** */ /* GP Frame */ @@ -511,6 +526,13 @@ typedef struct bGPdata_Runtime { /** Vertex Color applied to Fill (while drawing). */ float vert_color_fill[4]; + /** Arrow points for stroke corners **/ + float arrow_start[8]; + float arrow_end[8]; + /* Arrow style for each corner */ + int arrow_start_style; + int arrow_end_style; + /** Number of control-points for stroke. */ int tot_cp_points; char _pad2[4]; |