Blender V4.3
annotate_paint.cc File Reference
#include <cmath>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_math_matrix.h"
#include "BLI_time.h"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "BKE_callbacks.hh"
#include "BKE_context.hh"
#include "BKE_gpencil_geom_legacy.h"
#include "BKE_gpencil_legacy.h"
#include "BKE_report.hh"
#include "BKE_screen.hh"
#include "BKE_tracking.h"
#include "DNA_gpencil_legacy_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
#include "UI_view2d.hh"
#include "ED_clip.hh"
#include "ED_gpencil_legacy.hh"
#include "ED_screen.hh"
#include "ED_view3d.hh"
#include "GPU_immediate.hh"
#include "GPU_immediate_util.hh"
#include "GPU_state.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "gpencil_intern.hh"

Go to the source code of this file.

Classes

struct  tGPsdata
 

Macros

#define DEPTH_INVALID   1.0f
 
#define MIN_MANHATTAN_PX   (U.gp_manhattandist)
 
#define MIN_EUCLIDEAN_PX   (U.gp_euclideandist)
 

Enumerations

enum  eGPencil_PaintStatus {
  GP_STATUS_IDLING = 0 , GP_STATUS_PAINTING , GP_STATUS_ERROR , GP_STATUS_DONE ,
  GP_STATUS_CAPTURE
}
 
enum  eGP_StrokeAdd_Result { GP_STROKEADD_INVALID = -2 , GP_STROKEADD_OVERFLOW = -1 , GP_STROKEADD_NORMAL , GP_STROKEADD_FULL }
 
enum  eGPencil_PaintFlags {
  GP_PAINTFLAG_FIRSTRUN = (1 << 0) , GP_PAINTFLAG_STROKEADDED = (1 << 1) , GP_PAINTFLAG_V3D_ERASER_DEPTH = (1 << 2) , GP_PAINTFLAG_SELECTMASK = (1 << 3) ,
  GP_PAINTFLAG_USE_STABILIZER = (1 << 7) , GP_PAINTFLAG_USE_STABILIZER_TEMP = (1 << 8)
}
 

Functions

static bool annotation_stroke_added_check (tGPsdata *p)
 
static void annotation_stroke_added_enable (tGPsdata *p)
 
static void annotation_session_validatebuffer (tGPsdata *p)
 
static bool annotation_draw_poll (bContext *C)
 
static bool annotation_project_check (tGPsdata *p)
 
static void annotation_get_3d_reference (tGPsdata *p, float vec[3])
 
static bool annotation_stroke_filtermval (tGPsdata *p, const float mval[2], const float pmval[2])
 
static void annotation_stroke_convertcoords (tGPsdata *p, const float mval[2], float out[3], const float *depth)
 
static void annotation_smooth_buffer (tGPsdata *p, float inf, int idx)
 
static void annotation_stroke_arrow_calc_points_segment (float stroke_points[8], const float ref_point[2], const float dir_cw[2], const float dir_ccw[2], const float length, const float sign)
 
static void annotation_stroke_arrow_calc_points (tGPspoint *point, const float stroke_dir[2], float corner[2], float stroke_points[8], const int arrow_style)
 
static short annotation_stroke_addpoint (tGPsdata *p, const float mval[2], float pressure, double curtime)
 
static void annotation_stroke_arrow_init_point_default (bGPDspoint *pt)
 
static void annotation_stroke_arrow_init_conv_point (bGPDspoint *pt, const float point[3])
 
static void annotation_stroke_arrow_init_point (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float co[8], const int co_idx)
 
static void annotation_stroke_arrow_allocate (bGPDstroke *gps, const int totpoints)
 
static void annotation_arrow_create_open (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float corner_point[3], const float arrow_points[8])
 
static void annotation_arrow_create_segm (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float arrow_points[8])
 
static void annotation_arrow_create_closed (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float arrow_points[8])
 
static void annotation_arrow_create_square (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float corner_point[3], const float arrow_points[8])
 
static void annotation_arrow_create (tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, bGPDstroke *arrow_stroke, const float arrow_points[8], const int style)
 
static void annotation_stroke_newfrombuffer (tGPsdata *p)
 
static void annotation_free_stroke (bGPDframe *gpf, bGPDstroke *gps)
 
static bool annotation_stroke_eraser_is_occluded (tGPsdata *p, const bGPDspoint *pt, const int x, const int y)
 
static void annotation_stroke_eraser_dostroke (tGPsdata *p, bGPDframe *gpf, bGPDstroke *gps, const float mval[2], const int radius, const rcti *rect)
 
static void annotation_stroke_doeraser (tGPsdata *p)
 
static bool annotation_session_initdata (bContext *C, tGPsdata *p)
 
static void annotation_visible_on_space (tGPsdata *p)
 
static tGPsdataannotation_session_initpaint (bContext *C)
 
static void annotation_session_cleanup (tGPsdata *p)
 
static void annotation_session_free (tGPsdata *p)
 
static void annotation_paint_initstroke (tGPsdata *p, eGPencil_PaintModes paintmode, Depsgraph *depsgraph)
 
static void annotation_paint_strokeend (tGPsdata *p)
 
static void annotation_paint_cleanup (tGPsdata *p)
 
static void annotation_draw_eraser (bContext *, int x, int y, void *p_ptr)
 
static void annotation_draw_toggle_eraser_cursor (tGPsdata *p, short enable)
 
static void annotation_draw_stabilizer (bContext *C, int x, int y, void *p_ptr)
 
static void annotation_draw_toggle_stabilizer_cursor (tGPsdata *p, short enable)
 
static bool annotation_is_tablet_eraser_active (const wmEvent *event)
 
static void annotation_draw_exit (bContext *C, wmOperator *op)
 
static void annotation_draw_cancel (bContext *C, wmOperator *op)
 
static int annotation_draw_init (bContext *C, wmOperator *op, const wmEvent *event)
 
static void annotation_draw_cursor_set (tGPsdata *p)
 
static void annotation_draw_status_indicators (bContext *C, tGPsdata *p)
 
static void annotation_draw_apply (wmOperator *op, tGPsdata *p, Depsgraph *depsgraph)
 
static void annotation_draw_apply_event (wmOperator *op, const wmEvent *event, Depsgraph *depsgraph, float x, float y)
 
static int annotation_draw_exec (bContext *C, wmOperator *op)
 
static int annotation_draw_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static bool annotation_area_exists (bContext *C, ScrArea *area_test)
 
static tGPsdataannotation_stroke_begin (bContext *C, wmOperator *op)
 
static void annotation_stroke_end (wmOperator *op)
 
static void annotation_add_missing_events (bContext *C, wmOperator *op, const wmEvent *event, tGPsdata *p)
 
static int annotation_draw_modal (bContext *C, wmOperator *op, const wmEvent *event)
 
void GPENCIL_OT_annotate (wmOperatorType *ot)
 

Variables

static const EnumPropertyItem prop_gpencil_drawmodes []
 
static const EnumPropertyItem arrow_types []
 

Macro Definition Documentation

◆ DEPTH_INVALID

#define DEPTH_INVALID   1.0f

◆ MIN_EUCLIDEAN_PX

#define MIN_EUCLIDEAN_PX   (U.gp_euclideandist)

Definition at line 189 of file annotate_paint.cc.

Referenced by annotation_stroke_filtermval().

◆ MIN_MANHATTAN_PX

#define MIN_MANHATTAN_PX   (U.gp_manhattandist)

Definition at line 187 of file annotate_paint.cc.

Referenced by annotation_stroke_filtermval().

Enumeration Type Documentation

◆ eGP_StrokeAdd_Result

Enumerator
GP_STROKEADD_INVALID 
GP_STROKEADD_OVERFLOW 
GP_STROKEADD_NORMAL 
GP_STROKEADD_FULL 

Definition at line 71 of file annotate_paint.cc.

◆ eGPencil_PaintFlags

Enumerator
GP_PAINTFLAG_FIRSTRUN 
GP_PAINTFLAG_STROKEADDED 
GP_PAINTFLAG_V3D_ERASER_DEPTH 
GP_PAINTFLAG_SELECTMASK 
GP_PAINTFLAG_USE_STABILIZER 
GP_PAINTFLAG_USE_STABILIZER_TEMP 

Definition at line 79 of file annotate_paint.cc.

◆ eGPencil_PaintStatus

Enumerator
GP_STATUS_IDLING 
GP_STATUS_PAINTING 
GP_STATUS_ERROR 
GP_STATUS_DONE 
GP_STATUS_CAPTURE 

Definition at line 62 of file annotate_paint.cc.

Function Documentation

◆ annotation_add_missing_events()

static void annotation_add_missing_events ( bContext * C,
wmOperator * op,
const wmEvent * event,
tGPsdata * p )
static

◆ annotation_area_exists()

static bool annotation_area_exists ( bContext * C,
ScrArea * area_test )
static

Definition at line 2374 of file annotate_paint.cc.

References BLI_findindex(), and CTX_wm_screen().

Referenced by annotation_draw_modal().

◆ annotation_arrow_create()

◆ annotation_arrow_create_closed()

static void annotation_arrow_create_closed ( tGPsdata * p,
tGPspoint * ptc,
bGPDspoint * pt,
const float arrow_points[8] )
static

Definition at line 746 of file annotate_paint.cc.

References annotation_stroke_arrow_init_point().

Referenced by annotation_arrow_create().

◆ annotation_arrow_create_open()

static void annotation_arrow_create_open ( tGPsdata * p,
tGPspoint * ptc,
bGPDspoint * pt,
const float corner_point[3],
const float arrow_points[8] )
static

◆ annotation_arrow_create_segm()

static void annotation_arrow_create_segm ( tGPsdata * p,
tGPspoint * ptc,
bGPDspoint * pt,
const float arrow_points[8] )
static

Definition at line 736 of file annotate_paint.cc.

References annotation_stroke_arrow_init_point().

Referenced by annotation_arrow_create().

◆ annotation_arrow_create_square()

static void annotation_arrow_create_square ( tGPsdata * p,
tGPspoint * ptc,
bGPDspoint * pt,
const float corner_point[3],
const float arrow_points[8] )
static

◆ annotation_draw_apply()

◆ annotation_draw_apply_event()

◆ annotation_draw_cancel()

static void annotation_draw_cancel ( bContext * C,
wmOperator * op )
static

Definition at line 1902 of file annotate_paint.cc.

References annotation_draw_exit().

Referenced by GPENCIL_OT_annotate().

◆ annotation_draw_cursor_set()

static void annotation_draw_cursor_set ( tGPsdata * p)
static

◆ annotation_draw_eraser()

◆ annotation_draw_exec()

◆ annotation_draw_exit()

◆ annotation_draw_init()

◆ annotation_draw_invoke()

◆ annotation_draw_modal()

static int annotation_draw_modal ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

Definition at line 2463 of file annotate_paint.cc.

References annotation_add_missing_events(), annotation_area_exists(), annotation_draw_apply_event(), annotation_draw_cursor_set(), annotation_draw_exit(), annotation_draw_status_indicators(), annotation_draw_toggle_eraser_cursor(), annotation_is_tablet_eraser_active(), annotation_stroke_begin(), annotation_stroke_end(), tGPsdata::area, BKE_area_find_region_xy(), BLI_rcti_isect_pt_v(), CTX_data_ensure_evaluated_depsgraph(), CTX_wm_region(), wmOperator::customdata, ED_region_tag_redraw(), ED_region_visible_rect(), ELEM, EVT_BKEY, EVT_DOWNARROWKEY, EVT_EKEY, EVT_ESCKEY, EVT_LEFTARROWKEY, EVT_PAD0, EVT_PAD1, EVT_PAD2, EVT_PAD3, EVT_PAD4, EVT_PAD5, EVT_PAD6, EVT_PAD7, EVT_PAD8, EVT_PAD9, EVT_PADENTER, EVT_PADMINUS, EVT_PADPLUSKEY, EVT_RETKEY, EVT_RIGHTARROWKEY, EVT_SPACEKEY, EVT_UPARROWKEY, EVT_ZKEY, wmOperator::flag, tGPsdata::flags, GP_PAINTFLAG_FIRSTRUN, GP_PAINTMODE_DRAW_POLY, GP_PAINTMODE_ERASER, GP_STATUS_DONE, GP_STATUS_ERROR, GP_STATUS_IDLING, GP_STATUS_PAINTING, ISKEYBOARD, ISMOUSE_BUTTON, ISMOUSE_MOTION, KM_PRESS, KM_RELEASE, wmEvent::mval, NA_EDITED, NC_GPENCIL, NDOF_MOTION, OP_IS_MODAL_CURSOR_REGION, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, tGPsdata::paintmode, printf, wmOperator::ptr, tGPsdata::radius, tGPsdata::region, ARegion::regiontype, RGN_TYPE_ANY, RGN_TYPE_TOOLS, RIGHTMOUSE, RNA_enum_get(), tGPsdata::status, wmEvent::type, wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_event_add_notifier(), WM_OP_EXEC_DEFAULT, WM_operator_name_call(), and wmEvent::xy.

Referenced by GPENCIL_OT_annotate().

◆ annotation_draw_poll()

static bool annotation_draw_poll ( bContext * C)
static

◆ annotation_draw_stabilizer()

◆ annotation_draw_status_indicators()

◆ annotation_draw_toggle_eraser_cursor()

static void annotation_draw_toggle_eraser_cursor ( tGPsdata * p,
short enable )
static

◆ annotation_draw_toggle_stabilizer_cursor()

static void annotation_draw_toggle_stabilizer_cursor ( tGPsdata * p,
short enable )
static

◆ annotation_free_stroke()

◆ annotation_get_3d_reference()

static void annotation_get_3d_reference ( tGPsdata * p,
float vec[3] )
static

◆ annotation_is_tablet_eraser_active()

static bool annotation_is_tablet_eraser_active ( const wmEvent * event)
static

◆ annotation_paint_cleanup()

static void annotation_paint_cleanup ( tGPsdata * p)
static

◆ annotation_paint_initstroke()

static void annotation_paint_initstroke ( tGPsdata * p,
eGPencil_PaintModes paintmode,
Depsgraph * depsgraph )
static

Definition at line 1528 of file annotate_paint.cc.

References bGPDlayer::actframe, tGPsdata::align_flag, GP_SpaceConversion::area, tGPsdata::area, BKE_callback_exec_id_depsgraph(), BKE_CB_EVT_ANNOTATION_PRE, BKE_gpencil_layer_active_get(), BKE_gpencil_layer_addnew(), BKE_gpencil_layer_frame_get(), BKE_gpencil_layer_is_editable(), tGPsdata::bmain, bGPDlayer::color, copy_m4_m4(), copy_v3_v3(), tGPsdata::custom_color, DATA_, depsgraph, tGPsdata::depsgraph, ED_view3d_calc_camera_border(), ListBase::first, bGPdata::flag, bGPDframe::flag, bGPDlayer::flag, tGPsdata::flags, GP_DATA_ANNOTATIONS, GP_FRAME_PAINT, GP_GETFRAME_ADD_COPY, GP_GETFRAME_ADD_NEW, GP_LAYER_LOCKED, GP_LAYER_NO_XRAY, GP_PAINTFLAG_FIRSTRUN, GP_PAINTFLAG_V3D_ERASER_DEPTH, GP_PAINTMODE_ERASER, GP_PROJECT_VIEWSPACE, GP_STATUS_CAPTURE, GP_STATUS_ERROR, GP_STROKE_2DSPACE, GP_STROKE_3DSPACE, GP_STROKE_ERASER, GP_TOOL_FLAG_RETAIN_LAST, GP_SpaceConversion::gpd, tGPsdata::gpd, ToolSettings::gpencil_flags, tGPsdata::gpf, GP_SpaceConversion::gpl, tGPsdata::gpl, tGPsdata::gsc, bGPdata::id, GP_SpaceConversion::mat, tGPsdata::mat, tGPsdata::paintmode, RegionView3D::persp, printf, GP_SpaceConversion::region, tGPsdata::region, ARegion::regiondata, bGPdata::runtime, RV3D_CAMOB, bGPdata_Runtime::sbuffer_sflag, tGPsdata::scene, SPACE_CLIP, SPACE_IMAGE, SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, tGPsdata::status, bGPDframe::strokes, GP_SpaceConversion::subrect, tGPsdata::subrect, GP_SpaceConversion::subrect_data, tGPsdata::subrect_data, GP_SpaceConversion::v2d, and tGPsdata::v2d.

Referenced by annotation_draw_apply(), annotation_draw_exec(), annotation_draw_init(), and annotation_stroke_begin().

◆ annotation_paint_strokeend()

◆ annotation_project_check()

◆ annotation_session_cleanup()

◆ annotation_session_free()

static void annotation_session_free ( tGPsdata * p)
static

Definition at line 1519 of file annotate_paint.cc.

References tGPsdata::depths, ED_view3d_depths_free(), and MEM_freeN().

Referenced by annotation_draw_exit().

◆ annotation_session_initdata()

◆ annotation_session_initpaint()

static tGPsdata * annotation_session_initpaint ( bContext * C)
static

◆ annotation_session_validatebuffer()

◆ annotation_smooth_buffer()

static void annotation_smooth_buffer ( tGPsdata * p,
float inf,
int idx )
static

Apply smooth to buffer while drawing to smooth point C, use 2 before (A, B) and current point (D):

A----B-----C------D

Parameters
pTemp data
infInfluence factor
idxIndex of the last point (need minimum 3 points in the array)

Definition at line 383 of file annotate_paint.cc.

References b, copy_v2_v2(), tGPsdata::gpd, interp_v2_v2v2(), tGPspoint::m_xy, madd_v2_v2fl(), bGPdata::runtime, bGPdata_Runtime::sbuffer, bGPdata_Runtime::sbuffer_used, and steps.

Referenced by annotation_stroke_addpoint().

◆ annotation_stroke_added_check()

static bool annotation_stroke_added_check ( tGPsdata * p)
static

◆ annotation_stroke_added_enable()

static void annotation_stroke_added_enable ( tGPsdata * p)
static

◆ annotation_stroke_addpoint()

static short annotation_stroke_addpoint ( tGPsdata * p,
const float mval[2],
float pressure,
double curtime )
static

Definition at line 511 of file annotate_paint.cc.

References ToolSettings::annotate_v3d_align, annotation_project_check(), annotation_smooth_buffer(), annotation_stroke_added_check(), annotation_stroke_arrow_calc_points(), annotation_stroke_convertcoords(), tGPsdata::area, bGPdata_Runtime::arrow_end, bGPdata_Runtime::arrow_end_style, bGPdata_Runtime::arrow_start, bGPdata_Runtime::arrow_start_style, copy_v2_v2(), tGPsdata::depsgraph, ED_gpencil_sbuffer_ensure(), ED_view3d_depth_override(), ListBase::first, tGPsdata::flags, float, GP_PAINTFLAG_USE_STABILIZER_TEMP, GP_PAINTMODE_DRAW, GP_PAINTMODE_DRAW_POLY, GP_PAINTMODE_DRAW_STRAIGHT, GP_PROJECT_DEPTH_ONLY_SELECTED, GP_PROJECT_DEPTH_VIEW, GP_STROKE_USE_ARROW_END, GP_STROKE_USE_ARROW_START, GP_STROKEADD_INVALID, GP_STROKEADD_NORMAL, tGPsdata::gpd, tGPsdata::gpf, tGPsdata::inittime, ListBase::last, tGPspoint::m_xy, MEM_reallocN, tGPsdata::paintmode, bGPDstroke::points, bGPDspoint::pressure, tGPspoint::pressure, tGPsdata::region, bGPdata::runtime, bGPdata_Runtime::sbuffer, bGPdata_Runtime::sbuffer_sflag, bGPdata_Runtime::sbuffer_size, bGPdata_Runtime::sbuffer_used, tGPsdata::scene, ScrArea::spacedata, bGPDspoint::strength, tGPspoint::strength, bGPDframe::strokes, bGPDspoint::time, tGPspoint::time, Scene::toolsettings, bGPDstroke::tot_triangles, bGPDstroke::totpoints, V3D_DEPTH_GPENCIL_ONLY, V3D_DEPTH_NO_OVERLAYS, V3D_DEPTH_SELECTED_ONLY, view3d_region_operator_needs_opengl(), tGPsdata::win, and bGPDspoint::x.

Referenced by annotation_draw_apply().

◆ annotation_stroke_arrow_allocate()

static void annotation_stroke_arrow_allocate ( bGPDstroke * gps,
const int totpoints )
static

◆ annotation_stroke_arrow_calc_points()

static void annotation_stroke_arrow_calc_points ( tGPspoint * point,
const float stroke_dir[2],
float corner[2],
float stroke_points[8],
const int arrow_style )
static

◆ annotation_stroke_arrow_calc_points_segment()

static void annotation_stroke_arrow_calc_points_segment ( float stroke_points[8],
const float ref_point[2],
const float dir_cw[2],
const float dir_ccw[2],
const float length,
const float sign )
static

Definition at line 431 of file annotate_paint.cc.

Referenced by annotation_stroke_arrow_calc_points().

◆ annotation_stroke_arrow_init_conv_point()

static void annotation_stroke_arrow_init_conv_point ( bGPDspoint * pt,
const float point[3] )
static

◆ annotation_stroke_arrow_init_point()

◆ annotation_stroke_arrow_init_point_default()

static void annotation_stroke_arrow_init_point_default ( bGPDspoint * pt)
static

◆ annotation_stroke_begin()

◆ annotation_stroke_convertcoords()

◆ annotation_stroke_doeraser()

◆ annotation_stroke_end()

◆ annotation_stroke_eraser_dostroke()

◆ annotation_stroke_eraser_is_occluded()

◆ annotation_stroke_filtermval()

◆ annotation_stroke_newfrombuffer()

static void annotation_stroke_newfrombuffer ( tGPsdata * p)
static

Create arrow strokes.

Definition at line 810 of file annotate_paint.cc.

References ToolSettings::annotate_v3d_align, annotation_arrow_create(), annotation_project_check(), annotation_stroke_added_check(), annotation_stroke_added_enable(), annotation_stroke_arrow_allocate(), annotation_stroke_arrow_init_point_default(), annotation_stroke_convertcoords(), bGPdata_Runtime::arrow_end, bGPdata_Runtime::arrow_end_style, bGPdata_Runtime::arrow_start, bGPdata_Runtime::arrow_start_style, bGPDstroke::aspect_ratio, BKE_gpencil_stroke_duplicate(), BLI_addtail(), CLAMP, copy_v2_fl(), copy_v2_v2_int(), DEPTH_INVALID, tGPsdata::depths, ED_view3d_depth_read_cached(), ED_view3d_depth_read_cached_seg(), bGPDstroke::fill_opacity_fac, bGPDstroke::flag, GP_PAINTMODE_DRAW_POLY, GP_PAINTMODE_DRAW_STRAIGHT, GP_PROJECT_DEPTH_STROKE, GP_PROJECT_DEPTH_STROKE_ENDPOINTS, GP_STROKE_ARROWSTYLE_NONE, GP_STROKE_USE_ARROW_END, GP_STROKE_USE_ARROW_START, tGPsdata::gpd, GPENCIL_STRENGTH_MIN, tGPsdata::gpf, tGPsdata::gpl, bGPDstroke::hardness, bGPDstroke::inittime, tGPsdata::inittime, interp_sparse_array(), tGPspoint::m_xy, MEM_callocN, MEM_freeN(), MEM_mallocN, tGPsdata::paintmode, bGPDstroke::points, bGPDspoint::pressure, tGPspoint::pressure, round_v2i_v2fl(), bGPdata::runtime, bGPdata_Runtime::sbuffer, bGPdata_Runtime::sbuffer_sflag, bGPdata_Runtime::sbuffer_used, tGPsdata::scene, bGPDspoint::strength, tGPspoint::strength, bGPDframe::strokes, bGPDlayer::thickness, bGPDstroke::thickness, bGPDspoint::time, tGPspoint::time, Scene::toolsettings, bGPDstroke::tot_triangles, bGPDstroke::totpoints, bGPDstroke::uv_scale, and bGPDspoint::x.

Referenced by annotation_paint_strokeend().

◆ annotation_visible_on_space()

◆ GPENCIL_OT_annotate()

Variable Documentation

◆ arrow_types

const EnumPropertyItem arrow_types[]
static
Initial value:
= {
{GP_STROKE_ARROWSTYLE_NONE, "NONE", 0, "None", "Don't use any arrow/style in corner"},
{GP_STROKE_ARROWSTYLE_CLOSED, "ARROW", 0, "Arrow", "Use closed arrow style"},
{GP_STROKE_ARROWSTYLE_OPEN, "ARROW_OPEN", 0, "Open Arrow", "Use open arrow style"},
"ARROW_OPEN_INVERTED",
0,
"Segment",
"Use perpendicular segment style"},
{GP_STROKE_ARROWSTYLE_SQUARE, "DIAMOND", 0, "Square", "Use square style"},
{0, nullptr, 0, nullptr, nullptr},
}
@ GP_STROKE_ARROWSTYLE_NONE
@ GP_STROKE_ARROWSTYLE_SEGMENT
@ GP_STROKE_ARROWSTYLE_CLOSED
@ GP_STROKE_ARROWSTYLE_OPEN
@ GP_STROKE_ARROWSTYLE_SQUARE

Definition at line 2779 of file annotate_paint.cc.

Referenced by GPENCIL_OT_annotate().

◆ prop_gpencil_drawmodes

const EnumPropertyItem prop_gpencil_drawmodes[]
static
Initial value:
= {
{GP_PAINTMODE_DRAW, "DRAW", 0, "Draw Freehand", "Draw freehand stroke(s)"},
"DRAW_STRAIGHT",
0,
"Draw Straight Lines",
"Draw straight line segment(s)"},
"DRAW_POLY",
0,
"Draw Poly Line",
"Click to place endpoints of straight line segments (connected)"},
{GP_PAINTMODE_ERASER, "ERASER", 0, "Eraser", "Erase Annotation strokes"},
{0, nullptr, 0, nullptr, nullptr},
}
@ GP_PAINTMODE_DRAW_POLY
@ GP_PAINTMODE_ERASER
@ GP_PAINTMODE_DRAW
@ GP_PAINTMODE_DRAW_STRAIGHT

Definition at line 2763 of file annotate_paint.cc.

Referenced by GPENCIL_OT_annotate().