204 #define MIN_MANHATTAN_PX (U.gp_manhattandist)
206 #define MIN_EUCLIDEAN_PX (U.gp_euclideandist)
277 int dx = (int)
fabsf(mval[0] - pmval[0]);
278 int dy = (int)
fabsf(mval[1] - pmval[1]);
338 float rvec[3], dvec[3];
401 if ((num_points < 3) || (idx < 3) || (inf == 0.0f)) {
416 float sco[2] = {0.0f};
417 float a[2], b[2],
c[2], d[2];
418 const float average_fac = 1.0f /
steps;
444 const float ref_point[2],
445 const float dir_cw[2],
446 const float dir_ccw[2],
450 stroke_points[0] = ref_point[0] + dir_cw[0] *
length *
sign;
451 stroke_points[1] = ref_point[1] + dir_cw[1] *
length *
sign;
452 stroke_points[2] = ref_point[0] + dir_ccw[0] *
length *
sign;
453 stroke_points[3] = ref_point[1] + dir_ccw[1] *
length *
sign;
457 const float stroke_dir[2],
459 float stroke_points[8],
460 const int arrow_style)
462 const int arrow_length = 8;
466 const float inv_norm_dir_clockwise[2] = {norm_dir[1], -norm_dir[0]};
467 const float inv_norm_dir_counterclockwise[2] = {-norm_dir[1], norm_dir[0]};
469 switch (arrow_style) {
472 stroke_points[0] =
corner[0] + inv_norm_dir_clockwise[0] * arrow_length + norm_dir[0];
473 stroke_points[1] =
corner[1] + inv_norm_dir_clockwise[1] * arrow_length + norm_dir[1];
474 stroke_points[2] =
corner[0] + inv_norm_dir_counterclockwise[0] * arrow_length + norm_dir[0];
475 stroke_points[3] =
corner[1] + inv_norm_dir_counterclockwise[1] * arrow_length + norm_dir[1];
480 inv_norm_dir_clockwise,
481 inv_norm_dir_counterclockwise,
493 inv_norm_dir_clockwise,
494 inv_norm_dir_counterclockwise,
497 stroke_points[4] =
corner[0] - norm_dir[0];
498 stroke_points[5] =
corner[1] - norm_dir[1];
501 mul_v2_fl(norm_dir, arrow_length * 1.5f);
508 inv_norm_dir_clockwise,
509 inv_norm_dir_counterclockwise,
510 arrow_length * 0.75f,
512 stroke_points[4] = stroke_points[0] - norm_dir[0];
513 stroke_points[5] = stroke_points[1] - norm_dir[1];
514 stroke_points[6] = stroke_points[2] - norm_dir[0];
515 stroke_points[7] = stroke_points[3] - norm_dir[1];
577 const float e_heading[2] = {start[0] - end[0], start[1] - end[1]};
584 const float s_heading[2] = {end[0] - start[0], end[1] - start[1]};
619 for (
int s = 0; s < 3; s++) {
712 const float real_co[2] = {co[co_idx], co[co_idx + 1]};
729 const float corner_point[3],
730 const float arrow_points[8])
742 const float arrow_points[8])
752 const float arrow_points[8])
766 const float corner_point[3],
767 const float arrow_points[8])
786 const float arrow_points[8],
789 float corner_conv[3];
840 printf(
"Error: No valid points in stroke buffer to convert (tot=%d)\n",
969 float *depth_arr =
NULL;
973 int mval_i[2], mval_prev[2] = {0};
974 int interp_depth = 0;
979 for (i = 0, ptc = gpd->
runtime.
sbuffer; i < gpd->runtime.sbuffer_used; i++, ptc++, pt++) {
984 p->
region, mval_i, mval_prev, depth_margin + 1, depth_arr + i) == 0))) {
994 if (found_depth ==
false) {
997 depth_arr[i] = 0.9999f;
1003 int first_valid = 0;
1007 if (depth_arr[i] != FLT_MAX) {
1014 if (depth_arr[i] != FLT_MAX) {
1021 for (i = first_valid + 1; i < last_valid; i++) {
1022 depth_arr[i] = FLT_MAX;
1025 interp_depth =
true;
1037 for (i = 0, ptc = gpd->
runtime.
sbuffer; i < gpd->runtime.sbuffer_used && ptc;
1101 const int mval_i[2] = {
x,
y};
1108 if (depth_pt > depth_mval) {
1120 const float mval[2],
1151 bool do_cull =
false;
1159 for (
int i = 0; i < gps->
totpoints; i++) {
1168 for (
int i = 0; (i + 1) < gps->
totpoints; i++) {
1171 pt2 = gps->
points + i + 1;
1275 if (curarea ==
NULL) {
1278 printf(
"Error: No active view for painting\n");
1310 "Error: 3D-View active region doesn't have any region data, so cannot be "
1340 printf(
"Error: In active view (sequencer), active mode doesn't support Grease Pencil\n");
1385 p->
imat[3][0] -= marker->
pos[0];
1386 p->
imat[3][1] -= marker->
pos[1];
1402 printf(
"Error: Annotations are not supported in this editor\n");
1413 printf(
"Error: Current context doesn't allow for any Annotation data\n");
1419 if (*gpd_ptr ==
NULL) {
1445 switch (
area->spacetype) {
1560 printf(
"Error: Cannot paint on locked layer\n");
1573 bool has_layer_to_erase =
false;
1578 has_layer_to_erase =
true;
1585 if (has_layer_to_erase ==
false) {
1588 printf(
"Error: Eraser will not be affecting anything (gpencil_paint_init)\n");
1608 printf(
"Error: No frame created (gpencil_paint_init)\n");
1761 float viewport_size[4];
1763 immUniform2f(
"viewport_size", viewport_size[2], viewport_size[3]);
1809 if (totpoints < 2) {
1812 const tGPspoint *pt = &points[totpoints - 1];
1820 const float color[3] = {1.0f, 0.39f, 0.39f};
1824 const float radius = 4.0f;
1937 if (event !=
NULL) {
1972 TIP_(
"Annotation Create Poly: LMB click to place next stroke vertex | "
1973 "ESC/Enter to end (or click outside this area)"));
1988 TIP_(
"Annotation Eraser: Hold and drag LMB or RMB to erase | "
1989 "ESC/Enter to end (or click outside this area)"));
1993 TIP_(
"Annotation Line Draw: Hold and drag LMB to draw | "
1994 "ESC/Enter to end (or click outside this area)"));
1998 TIP_(
"Annotation Freehand Draw: Hold and drag LMB to draw | "
1999 "E/ESC/Enter to end (or click outside this area)"));
2004 TIP_(
"Annotation Create Poly: LMB click to place next stroke vertex | "
2005 "ESC/Enter to end (or click outside this area)"));
2010 C,
TIP_(
"Annotation Session: ESC/Enter to end (or click outside this area)"));
2045 float last_mouse[2];
2078 printf(
"Error: Grease-Pencil Paint - Add Point Invalid\n");
2103 p->
mval[1] = (
float)
event->mval[1] -
y;
2121 else if (event->
ctrl || event->
alt) {
2125 if ((dx > 0) || (dy > 0)) {
2163 p->
pressure =
event->tablet.pressure;
2211 mousef[0] = p->
mval[0];
2212 mousef[1] = p->
mval[1];
2260 p->
mval[0] = (int)mousef[0];
2261 p->
mval[1] = (int)mousef[1];
2316 printf(
"GPencil - Starting Drawing\n");
2325 printf(
"\tGP - no valid data\n");
2361 else if (event->
shift) {
2409 printf(
"\t\t\tGP - wrong area execution abort!\n");
2456 float pt[2],
a[2], b[2];
2457 float factor = 10.0f;
2461 b[1] = (
float)
event->mval[1] + 1.0f;
2473 else if (dist >= factor) {
2474 int slices = 2 + (int)((dist - 1.0) / factor);
2475 float n = 1.0f / slices;
2476 for (
int i = 1; i < slices; i++) {
2625 bool in_bounds =
false;
2637 printf(
"found alternative region %p (old was %p) - at %d %d (area: %d %d -> %d %d)\n",
2648 if (current_region) {
2652 p->
region = current_region;
2661 printf(
"%s: Region under cursor is out of bounds, so cannot be drawn on\n", __func__);
2676 printf(
"%s: No active region found in GP Paint session data\n", __func__);
2731 printf(
"\t\t\t\tGP - add error done!\n");
2747 switch (event->
type) {
2805 printf(
"unhandled event -> %d (mmb? = %d | mmv? = %d)\n",
2824 "Draw Straight Lines",
2825 "Draw straight line segment(s)"},
2830 "Click to place endpoints of straight line segments (connected)"},
2840 "ARROW_OPEN_INVERTED",
2843 "Use perpendicular segment style"},
2853 ot->
name =
"Annotation Draw";
2854 ot->
idname =
"GPENCIL_OT_annotate";
2873 ot->
srna,
"arrowstyle_start",
arrow_types, 0,
"Start Arrow Style",
"Stroke start style");
2875 ot->
srna,
"arrowstyle_end",
arrow_types, 0,
"End Arrow Style",
"Stroke end style");
2880 "Helper to draw smooth and clean lines. Press Shift for an invert effect "
2881 "(even if this option is not active)");
2883 "stabilizer_factor",
2887 "Stabilizer Stroke Factor",
2888 "Higher values gives a smoother stroke",
2892 "stabilizer_radius",
2896 "Stabilizer Stroke Radius",
2897 "Minimum distance from last point before stroke continues",
2911 "Wait for first click instead of painting immediately");
typedef float(TangentPoint)[2]
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg)
struct Main * CTX_data_main(const bContext *C)
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
void BKE_gpencil_free_stroke_weights(struct bGPDstroke *gps)
bool BKE_gpencil_layer_is_editable(const struct bGPDlayer *gpl)
struct bGPDframe * BKE_gpencil_layer_frame_get(struct bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
#define GPENCIL_STRENGTH_MIN
struct bGPdata * BKE_gpencil_data_addnew(struct Main *bmain, const char name[])
struct bGPDstroke * BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src, const bool dup_points, const bool dup_curve)
struct bGPDlayer * BKE_gpencil_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive)
struct bGPDstroke * BKE_gpencil_stroke_delete_tagged_points(struct bGPdata *gpd, struct bGPDframe *gpf, struct bGPDstroke *gps, struct bGPDstroke *next_stroke, int tag_flags, const bool select, const bool flat_cap, const int limit)
void BKE_report(ReportList *reports, ReportType type, const char *message)
struct ARegion * BKE_area_find_region_xy(struct ScrArea *area, const int regiontype, int x, int y)
struct MovieTrackingTrack * BKE_tracking_track_get_active(struct MovieTracking *tracking)
struct MovieTrackingMarker * BKE_tracking_marker_get(struct MovieTrackingTrack *track, int framenr)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
int interp_sparse_array(float *array, const int list_size, const float skipval)
void unit_m4(float m[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void round_v2i_v2fl(int r[2], const float a[2])
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], const float t)
MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f)
MINLINE float len_v2v2_int(const int v1[2], const int v2[2])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v3(float r[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
MINLINE float normalize_v2(float r[2])
MINLINE void copy_v2_fl(float r[2], float f)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
bool BLI_rcti_isect_pt(const struct rcti *rect, const int x, const int y)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
typedef double(DMatrix)[4][4]
struct Depsgraph Depsgraph
@ GP_STROKE_ARROWSTYLE_NONE
@ GP_STROKE_ARROWSTYLE_SEGMENT
@ GP_STROKE_ARROWSTYLE_CLOSED
@ GP_STROKE_ARROWSTYLE_OPEN
@ GP_STROKE_ARROWSTYLE_SQUARE
@ GP_STROKE_USE_ARROW_END
@ GP_STROKE_USE_ARROW_START
Object is a sort of wrapper for general info.
@ GP_PROJECT_DEPTH_STROKE_ENDPOINTS
@ GP_PROJECT_DEPTH_STROKE
@ GP_TOOL_FLAG_RETAIN_LAST
#define V3D_SHOW_ANNOTATION
@ OP_IS_MODAL_CURSOR_REGION
int ED_space_clip_get_clip_frame_number(struct SpaceClip *sc)
struct MovieClip * ED_space_clip_get_clip(struct SpaceClip *sc)
bool ED_operator_regionactive(struct bContext *C)
void ED_region_tag_redraw(struct ARegion *region)
void ED_workspace_status_text(struct bContext *C, const char *str)
const rcti * ED_region_visible_rect(ARegion *region)
void ED_view3d_calc_camera_border(const struct Scene *scene, struct Depsgraph *depsgraph, const struct ARegion *region, const struct View3D *v3d, const struct RegionView3D *rv3d, struct rctf *r_viewborder, const bool no_shift)
void ED_view3d_win_to_delta(const struct ARegion *region, const float mval[2], float out[3], const float zfac)
void ED_view3d_depth_override(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, struct Object *obact, eV3DDepthOverrideMode mode, bool update_cache)
void view3d_region_operator_needs_opengl(struct wmWindow *win, struct ARegion *region)
bool ED_view3d_autodist_simple(struct ARegion *region, const int mval[2], float mouse_worldloc[3], int margin, const float *force_depth)
eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *region, const float co[3], float r_co[2], const eV3DProjTest flag)
float ED_view3d_calc_zfac(const struct RegionView3D *rv3d, const float co[3], bool *r_flip)
bool ED_view3d_autodist_depth_seg(struct ARegion *region, const int mval_sta[2], const int mval_end[2], int margin, float *depth)
bool ED_view3d_autodist_depth(struct ARegion *region, const int mval[2], int margin, float *depth)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
@ GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR
@ GPU_SHADER_2D_UNIFORM_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_line_width(float width)
void GPU_line_smooth(bool enable)
void GPU_viewport_size_get_f(float coords[4])
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
Group RGB to Bright Vector Camera CLAMP
Platform independent time functions.
#define RNA_BEGIN(sptr, itemptr, propname)
StructRNA RNA_OperatorStrokeElement
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void GPENCIL_OT_annotate(wmOperatorType *ot)
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_arrow_create(tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, bGPDstroke *arrow_stroke, const float arrow_points[8], const int style)
static void annotation_arrow_create_square(tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float corner_point[3], const float arrow_points[8])
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_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_ptr)
static tGPsdata * annotation_stroke_begin(bContext *C, wmOperator *op)
static void annotation_get_3d_reference(tGPsdata *p, float vec[3])
static void annotation_smooth_buffer(tGPsdata *p, float inf, int idx)
static bool annotation_session_initdata(bContext *C, tGPsdata *p)
@ GP_PAINTFLAG_SELECTMASK
@ GP_PAINTFLAG_USE_STABILIZER
@ GP_PAINTFLAG_STROKEADDED
@ GP_PAINTFLAG_V3D_ERASER_DEPTH
@ GP_PAINTFLAG_USE_STABILIZER_TEMP
static void annotation_stroke_end(wmOperator *op)
static int annotation_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void annotation_stroke_newfrombuffer(tGPsdata *p)
static bool annotation_draw_poll(bContext *C)
static bool annotation_stroke_filtermval(tGPsdata *p, const float mval[2], const float pmval[2])
static int annotation_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void annotation_arrow_create_segm(tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float arrow_points[8])
static void annotation_stroke_added_enable(tGPsdata *p)
static bool annotation_area_exists(bContext *C, ScrArea *area_test)
static void annotation_add_missing_events(bContext *C, wmOperator *op, const wmEvent *event, tGPsdata *p)
static void annotation_paint_initstroke(tGPsdata *p, eGPencil_PaintModes paintmode, Depsgraph *depsgraph)
static void annotation_stroke_arrow_init_point(tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float co[8], const int co_idx)
static void annotation_draw_stabilizer(bContext *C, int x, int y, void *p_ptr)
static void annotation_draw_exit(bContext *C, wmOperator *op)
static bool annotation_stroke_added_check(tGPsdata *p)
static void annotation_stroke_arrow_allocate(bGPDstroke *gps, const int totpoints)
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_paint_strokeend(tGPsdata *p)
static float view3d_point_depth(const RegionView3D *rv3d, const float co[3])
static void annotation_draw_toggle_stabilizer_cursor(tGPsdata *p, short enable)
static bool annotation_project_check(tGPsdata *p)
static tGPsdata * annotation_session_initpaint(bContext *C)
static bool annotation_is_tablet_eraser_active(const wmEvent *event)
static void annotation_draw_apply(wmOperator *op, tGPsdata *p, Depsgraph *depsgraph)
static int annotation_draw_init(bContext *C, wmOperator *op, const wmEvent *event)
static void annotation_session_cleanup(tGPsdata *p)
static int annotation_draw_exec(bContext *C, wmOperator *op)
static void annotation_draw_apply_event(wmOperator *op, const wmEvent *event, Depsgraph *depsgraph, float x, float y)
static void annotation_arrow_create_closed(tGPsdata *p, tGPspoint *ptc, bGPDspoint *pt, const float arrow_points[8])
static void annotation_draw_cancel(bContext *C, wmOperator *op)
static const EnumPropertyItem arrow_types[]
static void annotation_draw_cursor_set(tGPsdata *p)
static void annotation_draw_status_indicators(bContext *C, tGPsdata *p)
static void annotation_visible_on_space(tGPsdata *p)
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_session_validatebuffer(tGPsdata *p)
static void annotation_stroke_doeraser(tGPsdata *p)
static void annotation_draw_toggle_eraser_cursor(tGPsdata *p, short enable)
static void annotation_session_free(tGPsdata *p)
static void annotation_stroke_arrow_init_point_default(bGPDspoint *pt)
static void annotation_stroke_convertcoords(tGPsdata *p, const float mval[2], float out[3], float *depth)
static const EnumPropertyItem prop_gpencil_drawmodes[]
static void annotation_free_stroke(bGPDframe *gpf, bGPDstroke *gps)
static void annotation_paint_cleanup(tGPsdata *p)
static void annotation_stroke_arrow_init_conv_point(bGPDspoint *pt, const float point[3])
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
const Depsgraph * depsgraph
void gpencil_undo_init(struct bGPdata *gpd)
@ GP_PAINTMODE_DRAW_STRAIGHT
void gpencil_undo_push(struct bGPdata *gpd)
void gpencil_undo_finish(void)
bool gpencil_stroke_inside_circle(const float mval[2], int rad, int x0, int y0, int x1, int y1)
void gpencil_point_to_xy(const GP_SpaceConversion *gsc, const struct bGPDstroke *gps, const struct bGPDspoint *pt, int *r_x, int *r_y)
int ED_gpencil_session_active(void)
bool ED_gpencil_stroke_can_use_direct(const ScrArea *area, const bGPDstroke *gps)
bool ED_gpencil_data_owner_is_annotation(PointerRNA *owner_ptr)
tGPspoint * ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array, int *buffer_size, int *buffer_used, const bool clear)
bGPdata ** ED_annotation_data_get_pointers(const bContext *C, PointerRNA *r_ptr)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct MovieTracking tracking
struct ToolSettings * toolsettings
struct MDeformVert * dvert
eGPencil_PaintStatus status
eGPencil_PaintModes paintmode
eGPencil_PaintFlags flags
struct Depsgraph * depsgraph
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
double PIL_check_seconds_timer(void)
__forceinline const avxi abs(const avxi &a)
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
int WM_operator_name_call(bContext *C, const char *opstring, short context, PointerRNA *properties)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
#define ISKEYBOARD(event_type)
bool WM_paint_cursor_end(wmPaintCursor *handle)
wmPaintCursor * WM_paint_cursor_activate(short space_type, short region_type, bool(*poll)(bContext *C), wmPaintCursorDraw draw, void *customdata)