268 #define STROKE_HORIZONTAL 1
269 #define STROKE_VERTICAL 2
273 #define MIN_MANHATTEN_PX (U.gp_manhattandist)
275 #define MIN_EUCLIDEAN_PX (U.gp_euclideandist)
370 int dx = (int)
fabsf(mval[0] - mvalo[0]);
371 int dy = (int)
fabsf(mval[1] - mvalo[1]);
451 rmval[0] = mval[0] - 0.5f;
452 rmval[1] = mval[1] - 0.5f;
463 if ((depth ==
NULL) || (*depth <= 1.0f)) {
469 float rvec[3], dvec[3];
495 const float axis[2] = {0.0f, 1.0f};
528 mvec[0] = (mval[0] - (pt - 1)->
x);
529 mvec[1] = (mval[1] - (pt - 1)->
y);
534 (pt - 1)->pressure = (pt - 1)->pressure - (sen * fac);
541 mvec[0] = (mval[0] - (pt - 1)->
x);
542 mvec[1] = (mval[1] - (pt - 1)->
y);
569 if ((num_points < 3) || (idx < 3) || (inf == 0.0f)) {
574 const float steps = (idx < 4) ? 3.0f : 4.0f;
581 float sco[2] = {0.0f};
582 float a[2], b[2],
c[2], d[2];
583 float pressure = 0.0f;
584 float strength = 0.0f;
585 const float average_fac = 1.0f /
steps;
591 pressure += pta->
pressure * average_fac;
592 strength += pta->
strength * average_fac;
597 pressure += ptb->
pressure * average_fac;
598 strength += ptb->
strength * average_fac;
603 pressure += ptc->
pressure * average_fac;
604 strength += ptc->
strength * average_fac;
609 pressure += ptd->
pressure * average_fac;
610 strength += ptd->
strength * average_fac;
628 const short num_points = to_idx - from_idx;
630 if ((num_points < 3) || (inf == 0.0f)) {
639 const float average_fac = 0.25f;
641 for (
int i = from_idx; i < to_idx + 1; i++) {
645 tGPspoint *ptc = i >= 1 ? &points[i - 1] : &points[i];
648 float sco[2] = {0.0f};
649 float pressure = 0.0f;
650 float strength = 0.0f;
655 pressure += pta->
pressure * average_fac;
656 strength += pta->
strength * average_fac;
660 pressure += ptc->
pressure * average_fac;
661 strength += ptc->
strength * average_fac;
666 pressure += ptb->
pressure * average_fac;
667 strength += ptb->
strength * average_fac;
671 pressure += ptc->
pressure * average_fac;
672 strength += ptc->
strength * average_fac;
676 pressure += ptc->
pressure * average_fac;
677 strength += ptc->
strength * average_fac;
680 pressure += ptd->
pressure * average_fac;
681 strength += ptd->
strength * average_fac;
744 if ((brush_settings->
uv_random > 0.0f) && (uv)) {
859 float jitpress = 1.0f;
864 const float exp_factor = brush_settings->
draw_jitter + 2.0f;
865 const float fac = rand *
square_f(exp_factor) * jitpress;
911 for (
int s = 0; s < 3; s++) {
942 const int def_nr = obact->
actdef - 1;
947 const bool is_camera = is_lock_axis_view && (rv3d->persp ==
RV3D_CAMOB) && (!is_depth);
981 printf(
"Error: No valid points in stroke buffer to convert (tot=%d)\n",
1046 if (dvert !=
NULL) {
1076 if (dvert !=
NULL) {
1086 for (
int i = 0; i < gps->
totpoints; i++, pt++) {
1098 float *depth_arr =
NULL;
1102 int mval_i[2], mval_prev[2] = {0};
1103 int interp_depth = 0;
1104 int found_depth = 0;
1108 for (i = 0, ptc = gpd->
runtime.
sbuffer; i < gpd->runtime.sbuffer_used; i++, ptc++, pt++) {
1114 p->
region, mval_i, mval_prev, depth_margin + 1, depth_arr + i) == 0))) {
1115 interp_depth =
true;
1124 if (found_depth ==
false) {
1127 depth_arr[i] = 0.9999f;
1134 int first_valid = 0;
1139 if (depth_arr[i] != FLT_MAX) {
1147 last_valid = first_valid;
1151 if (depth_arr[i] != FLT_MAX) {
1160 if (!
ELEM(i, first_valid, last_valid)) {
1161 depth_arr[i] = FLT_MAX;
1164 interp_depth =
true;
1178 for (i = 0, ptc = gpd->
runtime.
sbuffer; i < gpd->runtime.sbuffer_used && ptc;
1194 if (dvert !=
NULL) {
1211 float reduce = 0.0f;
1213 for (i = 0; i < gps->
totpoints - 1; i++) {
1224 float sfac =
interpf(1.0f, 0.2f, ifac);
1225 for (i = 0; i < gps->
totpoints - 1; i++) {
1242 if ((!is_depth) && (((align_flag &
GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || is_camera)) {
1275 for (
int i = 0; i < gps->
totpoints; i++) {
1295 while (doit && gps) {
1298 if (gps_target !=
NULL) {
1344 gp_settings = brush->gpencil_settings;
1347 gp_settings = eraser->gpencil_settings;
1354 const int mval_i[2] = {
x,
y};
1358 float diff_mat[4][4];
1370 if (depth_pt > depth_mval) {
1382 const float mval[2],
1444 for (i = 1; i < gps->
totpoints - 1; i++, pt++) {
1446 pt2 = &gps->
points[i + 1];
1455 for (i = gps->
totpoints - 1; i > 0; i--, pt--) {
1457 pt2 = &gps->
points[i - 1];
1470 const float mval[2],
1505 for (i = 0; (i + 1) < gps->
totpoints; i++) {
1531 const float cull_thresh = 0.005f;
1534 const float strength = 0.1f;
1537 bool do_cull =
false;
1558 for (i = 0; (i + 1) < gps->
totpoints; i++) {
1562 pt2 = gps->
points + i + 1;
1598 bool is_occluded_pt0 =
true, is_occluded_pt1 =
true, is_occluded_pt2 =
true;
1604 if (is_occluded_pt0) {
1608 if (is_occluded_pt1) {
1615 if (!is_occluded_pt0 || !is_occluded_pt1 || !is_occluded_pt2) {
1626 float influence = 0.0f;
1630 pt0->
strength -= influence * strength * f_strength * 0.5f;
1632 pt0->
pressure -= influence * strength * f_thickness * 0.5f;
1636 pt1->
strength -= influence * strength * f_strength;
1638 pt1->
pressure -= influence * strength * f_thickness;
1641 pt2->
strength -= influence * strength * f_strength * 0.5f;
1643 pt2->
pressure -= influence * strength * f_thickness * 0.5f;
1682 if ((inf1 > 0.0f) &&
1688 if ((inf1 > 2.0f) &&
1722 bool use_pressure =
false;
1737 CLAMP(press, 0.01f, 1.0f);
1740 const int calc_radius = (int)p->
radius * press;
1741 rect.
xmin = p->
mval[0] - calc_radius;
1742 rect.
ymin = p->
mval[1] - calc_radius;
1743 rect.
xmax = p->
mval[0] + calc_radius;
1744 rect.
ymax = p->
mval[1] + calc_radius;
1764 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
1770 if ((gpf == gpl->actframe) || ((gpf->flag &
GP_FRAME_SELECT) && (is_multiedit))) {
1799 if (!is_multiedit) {
1838 if (brush->gpencil_settings ==
NULL) {
1843 if (brush_dft ==
NULL) {
1860 brush_dft->
size = 30.0f;
1875 if (brush_dft ==
NULL) {
1881 if (brush == brush_dft) {
1899 bool changed =
false;
1961 if (curarea ==
NULL) {
1964 printf(
"Error: No active view for painting\n");
1996 "Error: 3D-View active region doesn't have any region data, so cannot be "
2007 ushort local_view_bits = 0;
2025 printf(
"Error: Active view not appropriate for Grease Pencil drawing\n");
2036 printf(
"Error: Current context doesn't allow for any Grease Pencil data\n");
2042 if (*gpd_ptr ==
NULL) {
2143 bool changed =
false;
2162 printf(
"Error: Cannot paint on locked layer\n");
2176 bool has_layer_to_erase =
false;
2195 if (gpl->actframe && gpl->actframe->strokes.first) {
2200 has_layer_to_erase =
true;
2210 if (has_layer_to_erase ==
false) {
2219 short add_frame_mode;
2243 printf(
"Error: No frame created (gpencil_paint_init)\n");
2391 float viewport_size[4];
2393 immUniform2f(
"viewport_size", viewport_size[2], viewport_size[3]);
2527 if (event !=
NULL) {
2551 TIP_(
"Grease Pencil Erase Session: Hold and drag LMB or RMB to erase | "
2552 "ESC/Enter to end (or click outside this area)"));
2557 TIP_(
"Grease Pencil Line Session: Hold and drag LMB to draw | "
2558 "ESC/Enter to end (or click outside this area)"));
2564 TIP_(
"Grease Pencil Guides: LMB click and release to place reference point | "
2565 "Esc/RMB to cancel"));
2573 TIP_(
"Grease Pencil Freehand Session: Hold and drag LMB to draw | "
2574 "M key to flip guide | O key to move reference point"));
2578 C,
TIP_(
"Grease Pencil Freehand Session: Hold and drag LMB to draw"));
2585 C,
TIP_(
"Grease Pencil Session: ESC/Enter to end (or click outside this area)"));
2607 const float origin[2],
2620 if (spacing > 0.0f) {
2621 v -= spacing * 0.5f;
2623 v = roundf((
v + spacing * 0.5f) / spacing) * spacing;
2631 const float origin[2],
2632 const float spacing,
2685 scale = vec[2] * rv3d->
pixsize;
2713 angle -= half_angle;
2724 switch (guide->
type) {
2765 point[1] = p->
mvali[1];
2768 point[0] = p->
mvali[0];
2797 float last_mouse[2];
2804 bool is_speed_guide = ((guide->
use_guide) &&
2806 if (is_speed_guide) {
2839 printf(
"Error: Grease-Pencil Paint - Add Point Invalid\n");
2873 bool is_speed_guide = ((guide->
use_guide) &&
2880 p->
shift =
event->shift;
2883 if ((is_speed_guide) ||
2888 if ((dx > 0) || (dy > 0)) {
2907 p->
pressure =
event->tablet.pressure;
2967 if (is_speed_guide) {
3012 if (is_speed_guide) {
3026 mousef[0] = p->
mval[0];
3027 mousef[1] = p->
mval[1];
3066 p->
mval[0] = mousef[0];
3067 p->
mval[1] = mousef[1];
3115 bool add_notifier =
false;
3122 add_notifier =
true;
3130 add_notifier =
true;
3135 add_notifier =
true;
3139 add_notifier =
true;
3143 add_notifier =
true;
3148 add_notifier =
false;
3153 add_notifier =
true;
3156 guide->
angle = 0.0f;
3159 else if (event->
alt) {
3169 add_notifier =
true;
3186 add_notifier =
true;
3192 else if (!event->
shift) {
3213 printf(
"GPencil - Starting Drawing\n");
3232 bool has_layer_to_erase =
false;
3236 if (gpl->actframe && gpl->actframe->strokes.first) {
3237 has_layer_to_erase =
true;
3242 if (!has_layer_to_erase) {
3254 printf(
"\tGP - no valid data\n");
3331 printf(
"\t\t\tGP - wrong area execution abort!\n");
3363 mvec[0] = pt->
x - pt_prev->
x;
3364 mvec[1] = pt->
y - pt_prev->
y;
3408 tGPspoint *pt_before = &points[idx_prev - 1];
3409 tGPspoint *pt_prev = &points[idx_prev - 2];
3414 float v_prev[2], v_cur[2], v_half[2];
3422 const float min_angle =
DEG2RADF(120.0f);
3424 if (
angle < min_angle) {
3443 float midpoint[2], start[2], end[2], cp1[2],
corner[2];
3449 corner[0] = midpoint[0] - (cp1[0] - midpoint[0]);
3450 corner[1] = midpoint[1] - (cp1[1] - midpoint[1]);
3451 float stepcolor = 1.0f / segments;
3454 for (
int i = 0; i < segments; i++) {
3455 pt = &points[idx_prev + i - 1];
3460 pt->pressure = pt_prev->pressure;
3461 pt->strength = pt_prev->strength;
3464 pt->vert_color, pt_before->vert_color, pt_prev->vert_color, stepcolor * (i + 1));
3469 CLAMP(pt->pressure, pt_prev->pressure * 0.5f, 1.0f);
3483 const float start[2],
3503 tGPspoint *pt_before = &points[idx_prev - 1];
3517 for (
int i = 0; i < segments; i++) {
3518 pt = &points[idx_prev + i - 1];
3525 pt->pressure = pt_before->pressure;
3526 pt->strength = pt_before->strength;
3527 copy_v4_v4(pt->vert_color, pt_before->vert_color);
3531 float step = 1.0f / (
float)(segments + 1);
3534 for (
int i = 0; i < segments; i++) {
3535 pt = &points[idx_prev + i - 1];
3542 pt->pressure = pt_before->pressure;
3543 pt->strength = pt_before->strength;
3544 copy_v4_v4(pt->vert_color, pt_before->vert_color);
3563 bool is_speed_guide = ((guide->
use_guide) &&
3572 if (input_samples == 0) {
3578 float mouse_prv[2], mouse_cur[2];
3579 float min_dist = 4.0f * samples;
3585 float dist =
len_v2v2(mouse_prv, mouse_cur);
3597 if ((dist > 3.0f) && (dist > min_dist)) {
3598 int slices = (dist / min_dist) + 1;
3600 if (is_speed_guide) {
3641 bool drawmode =
false;
3643 switch (event->
type) {
3736 bool in_bounds =
false;
3748 printf(
"found alternative region %p (old was %p) - at %d %d (area: %d %d -> %d %d)\n",
3759 if (current_region) {
3763 p->
region = current_region;
3772 printf(
"%s: Region under cursor is out of bounds, so cannot be drawn on\n", __func__);
3787 printf(
"%s: No active region found in GP Paint session data\n", __func__);
3834 bool is_speed_guide = ((guide->
use_guide) &&
3848 if (!is_speed_guide && (size_after - size_before > 1)) {
3849 for (
int r = 0;
r < 5;
r++) {
3856 printf(
"\t\t\t\tGP - add error done!\n");
3868 switch (event->
type) {
3944 "Draw Straight Lines",
3945 "Draw straight line segment(s)"},
3955 ot->
name =
"Grease Pencil Draw";
3957 ot->
description =
"Draw a new stroke in the active Grease Pencil object";
3982 "Wait for first click instead of painting immediately");
3986 ot->
srna,
"disable_straight",
false,
"No Straight lines",
"Disable key for straight lines");
3993 "Disable fill to use stroke as fill boundary");
4006 "Speed guide angle",
4020 float oldangle = guide->
angle;
4034 ot->
name =
"Rotate Guide Angle";
4035 ot->
idname =
"GPENCIL_OT_guide_rotate";
4049 ot->
srna,
"angle", 0.0f, -10000.0f, 10000.0f,
"Angle",
"Guide angle", -10000.0f, 10000.0f);
typedef float(TangentPoint)[2]
void BKE_brush_gpencil_paint_presets(struct Main *bmain, struct ToolSettings *ts, const bool reset)
struct Brush * BKE_brush_add_gpencil(struct Main *bmain, struct ToolSettings *ts, const char *name, eObjectMode mode)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct bGPDlayer * CTX_data_active_gpencil_layer(const bContext *C)
struct bGPdata * CTX_data_gpencil_data(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(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)
void BKE_gpencil_dvert_ensure(struct bGPDstroke *gps)
bool BKE_gpencil_layer_is_editable(const struct bGPDlayer *gpl)
struct Material * BKE_gpencil_object_material_ensure_from_active_input_brush(struct Main *bmain, struct Object *ob, struct Brush *brush)
#define GPENCIL_ALPHA_OPACITY_THRESH
struct bGPDframe * BKE_gpencil_layer_frame_get(struct bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
int BKE_gpencil_object_material_get_index_from_brush(struct Object *ob, struct Brush *brush)
#define GPENCIL_STRENGTH_MIN
struct bGPdata * BKE_gpencil_data_addnew(struct Main *bmain, const char name[])
void BKE_gpencil_layer_transform_matrix_get(const struct Depsgraph *depsgraph, struct Object *obact, struct bGPDlayer *gpl, float diff_mat[4][4])
struct bGPDlayer * BKE_gpencil_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive)
bool BKE_gpencil_stroke_smooth_strength(struct bGPDstroke *gps, int point_index, float influence)
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_gpencil_stroke_simplify_adaptive(struct bGPdata *gpd, struct bGPDstroke *gps, float epsilon)
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
bool BKE_gpencil_stroke_smooth(struct bGPDstroke *gps, int i, float inf)
void BKE_gpencil_stroke_copy_to_keyframes(struct bGPdata *gpd, struct bGPDlayer *gpl, struct bGPDframe *gpf, struct bGPDstroke *gps, const bool tail)
bool BKE_gpencil_stroke_trim(struct bGPdata *gpd, struct bGPDstroke *gps)
General operations, lookup, etc. for materials.
short BKE_object_material_slot_find_index(struct Object *ob, struct Material *ma)
void BKE_paint_brush_set(struct Paint *paint, struct Brush *br)
struct Brush * BKE_paint_brush(struct Paint *paint)
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)
BLI_INLINE float BLI_hash_int_01(unsigned int k)
BLI_INLINE unsigned int BLI_hash_int_2d(unsigned int kx, unsigned int ky)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
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)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
MINLINE float square_f(float a)
MINLINE float interpf(float a, float b, float t)
MINLINE float cross_tri_v2(const float v1[2], const float v2[2], const float v3[2])
float closest_to_line_v2(float r_close[2], const float p[2], const float l1[2], const float l2[2])
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 mul_m4_v3(const float M[4][4], float r[3])
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])
void loc_eul_size_to_mat4(float R[4][4], const float loc[3], const float eul[3], const float size[3])
float angle_compat_rad(float angle, float angle_compat)
float angle_v2v2v2(const float a[2], const float b[2], const float c[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void round_v2i_v2fl(int r[2], const float a[2])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v2fl_v2i(float r[2], const int a[2])
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], const float t)
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void rotate_v2_v2fl(float r[2], const float p[2], const float angle)
MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f)
float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v2_v2(float r[2], const float a[2])
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)
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t)
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 float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void dist_ensure_v2_v2fl(float v1[2], const float v2[2], const float dist)
void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v3(float r[3])
MINLINE float normalize_v2(float r[2])
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
struct RNG * BLI_rng_new(unsigned int seed)
float BLI_rng_get_float(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
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)
#define POINTER_AS_UINT(i)
typedef double(DMatrix)[4][4]
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
@ ID_RECALC_COPY_ON_WRITE
@ GP_BRUSH_USE_STRENGTH_RAND_PRESS
@ GP_BRUSH_USE_STRENGTH_AT_STROKE
@ GP_BRUSH_USE_UV_RAND_PRESS
@ GP_BRUSH_USE_PRESS_AT_STROKE
@ GP_BRUSH_USE_UV_AT_STROKE
@ GP_BRUSH_USE_PRESSURE_RAND_PRESS
@ GP_BRUSH_STABILIZE_MOUSE_TEMP
@ GP_BRUSH_OCCLUDE_ERASER
@ GP_BRUSH_DEFAULT_ERASER
@ GP_BRUSH_USE_STRENGTH_PRESSURE
@ GP_BRUSH_GROUP_SETTINGS
@ GP_BRUSH_USE_JITTER_PRESSURE
@ GP_BRUSH_ICON_ERASE_SOFT
#define GP_MAX_INPUT_SAMPLES
#define GPENCIL_MULTIEDIT_SESSIONS_ON(gpd)
#define GPENCIL_PAINT_MODE(gpd)
@ GP_DATA_STROKE_WEIGHTMODE
@ GP_DATA_STROKE_PAINTMODE
@ GP_DATA_STROKE_SCULPTMODE
@ GP_DATA_STROKE_EDITMODE
#define GPENCIL_LAZY_MODE(brush, shift)
Object is a sort of wrapper for general info.
@ GP_PROJECT_DEPTH_STROKE_ENDPOINTS
@ GP_PROJECT_DEPTH_STROKE
@ GP_PROJECT_DEPTH_STROKE_FIRST
@ GP_TOOL_FLAG_RETAIN_LAST
@ GP_TOOL_FLAG_PAINT_ONBACK
@ GP_TOOL_FLAG_AUTOMERGE_STROKE
@ GP_TOOL_FLAG_CREATE_WEIGHTS
@ OP_IS_MODAL_CURSOR_REGION
#define GPENCIL_MINIMUM_JOIN_DIST
#define IS_AUTOKEY_ON(scene)
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 GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_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_smooth(bool enable)
void GPU_viewport_size_get_f(float coords[4])
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
Platform independent time functions.
#define RNA_BEGIN(sptr, itemptr, propname)
StructRNA RNA_OperatorStrokeElement
#define ND_SPACE_PROPERTIES
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
const Depsgraph * depsgraph
@ GP_PAINTMODE_DRAW_STRAIGHT
void gpencil_subdivide_stroke(bGPdata *gpd, bGPDstroke *gps, const int subdivide)
void gpencil_point_to_parent_space(const bGPDspoint *pt, const float diff_mat[4][4], bGPDspoint *r_pt)
void gpencil_apply_parent_point(struct Depsgraph *depsgraph, struct Object *obact, bGPDlayer *gpl, bGPDspoint *pt)
void gpencil_point_3d_to_xy(const GP_SpaceConversion *gsc, const short flag, const float pt[3], float xy[2])
void gpencil_undo_finish(void)
void gpencil_apply_parent(struct Depsgraph *depsgraph, struct Object *obact, bGPDlayer *gpl, bGPDstroke *gps)
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)
void GPENCIL_OT_guide_rotate(wmOperatorType *ot)
static void gpencil_stroke_added_enable(tGPsdata *p)
static tGPsdata * gpencil_session_initpaint(bContext *C, wmOperator *op)
static void gpencil_update_cache(bGPdata *gpd)
static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static float gpencil_stroke_eraser_calc_influence(tGPsdata *p, const float mval[2], const int radius, const int co[2])
void GPENCIL_OT_draw(wmOperatorType *ot)
static void gpencil_stroke_doeraser(tGPsdata *p)
static tGPsdata * gpencil_stroke_begin(bContext *C, wmOperator *op)
static void gpencil_free_stroke(bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps)
static void gpencil_paint_strokeend(tGPsdata *p)
static void gpencil_brush_angle(bGPdata *gpd, Brush *brush, tGPspoint *pt, const float mval[2])
static void gpencil_session_validatebuffer(tGPsdata *p)
@ GP_PAINTFLAG_HARD_ERASER
@ GP_PAINTFLAG_SELECTMASK
@ GP_PAINTFLAG_REQ_VECTOR
@ GP_PAINTFLAG_STROKEADDED
@ GP_PAINTFLAG_STROKE_ERASER
static void gpencil_reproject_toplane(tGPsdata *p, bGPDstroke *gps)
static void gpencil_get_3d_reference(tGPsdata *p, float vec[3])
static void gpencil_rotate_v2_v2v2fl(float v[2], const float p[2], const float origin[2], const float angle)
static int gpencil_draw_exec(bContext *C, wmOperator *op)
static void gpencil_guide_event_handling(bContext *C, wmOperator *op, const wmEvent *event, tGPsdata *p)
static bool gpencil_project_check(tGPsdata *p)
static void gpencil_brush_angle_segment(tGPsdata *p, tGPspoint *pt_prev, tGPspoint *pt)
static void gpencil_session_free(tGPsdata *p)
static short gpencil_stroke_addpoint(tGPsdata *p, const float mval[2], float pressure, double curtime)
static bool gpencil_is_tablet_eraser_active(const wmEvent *event)
static void gpencil_add_fake_points(const wmEvent *event, tGPsdata *p)
static void gpencil_stroke_eraser_dostroke(tGPsdata *p, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps, const float mval[2], const int radius, const rcti *rect)
static void gpencil_add_arc_points(tGPsdata *p, const float mval[2], int segments)
static void gpencil_stroke_convertcoords(tGPsdata *p, const float mval[2], float out[3], float *depth)
static void gpencil_snap_to_guide(const tGPsdata *p, const GP_Sculpt_Guide *guide, float point[2])
static void gpencil_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_ptr)
static void gpencil_stroke_newfrombuffer(tGPsdata *p)
static void gpencil_stroke_soft_refine(bGPDstroke *gps)
static bool gpencil_stroke_filtermval(tGPsdata *p, const float mval[2], const float mvalo[2])
static void gpencil_paint_cleanup(tGPsdata *p)
static void gpencil_add_guide_points(const tGPsdata *p, const GP_Sculpt_Guide *guide, const float start[2], const float end[2], int segments)
static bool gpencil_session_initdata(bContext *C, wmOperator *op, tGPsdata *p)
static void gpencil_origin_get(tGPsdata *p, float origin[2])
static float view3d_point_depth(const RegionView3D *rv3d, const float co[3])
static float gpencil_snap_to_grid_fl(float v, const float offset, const float spacing)
static bool gpencil_draw_poll(bContext *C)
static void gpencil_apply_randomness(tGPsdata *p, BrushGpencilSettings *brush_settings, tGPspoint *pt, const bool press, const bool strength, const bool uv)
static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
#define STROKE_HORIZONTAL
static int gpencil_draw_init(bContext *C, wmOperator *op, const wmEvent *event)
static bool gpencil_stroke_eraser_is_occluded(tGPsdata *p, bGPDlayer *gpl, bGPDspoint *pt, const int x, const int y)
static void gpencil_smooth_buffer(tGPsdata *p, float inf, int idx)
static Brush * gpencil_get_default_eraser(Main *bmain, ToolSettings *ts)
static void gpencil_origin_set(wmOperator *op, const int mval[2])
static void gpencil_smooth_segment(bGPdata *gpd, const float inf, int from_idx, int to_idx)
static void gpencil_init_drawing_brush(bContext *C, tGPsdata *p)
static void gpencil_snap_to_rotated_grid_fl(float v[2], const float origin[2], const float spacing, const float angle)
static int gpencil_guide_rotate(bContext *C, wmOperator *op)
static void gpencil_init_colors(tGPsdata *p)
static void gpencil_brush_jitter(bGPdata *gpd, tGPspoint *pt, const float amplitude)
static void gpencil_draw_apply_event(bContext *C, wmOperator *op, const wmEvent *event, Depsgraph *depsgraph)
static void gpencil_draw_cancel(bContext *C, wmOperator *op)
static void gpencil_speed_guide_init(tGPsdata *p, GP_Sculpt_Guide *guide)
static void gpencil_draw_apply(bContext *C, wmOperator *op, tGPsdata *p, Depsgraph *depsgraph)
static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
static void gpencil_set_default_eraser(Main *bmain, Brush *brush_dft)
static void gpencil_paint_initstroke(tGPsdata *p, eGPencil_PaintModes paintmode, Depsgraph *depsgraph)
static const EnumPropertyItem prop_gpencil_drawmodes[]
static void gpencil_session_cleanup(tGPsdata *p)
static void gpencil_draw_exit(bContext *C, wmOperator *op)
static bool gpencil_area_exists(bContext *C, ScrArea *area_test)
static void gpencil_draw_toggle_eraser_cursor(tGPsdata *p, short enable)
int ED_gpencil_session_active(void)
void ED_gpencil_stroke_close_by_distance(bGPDstroke *gps, const float threshold)
Object * ED_gpencil_add_object(bContext *C, const float loc[3], ushort local_view_bits)
bool ED_gpencil_stroke_material_editable(Object *ob, const bGPDlayer *gpl, const bGPDstroke *gps)
void ED_gpencil_project_point_to_plane(const Scene *scene, const Object *ob, bGPDlayer *gpl, const RegionView3D *rv3d, const float origin[3], const int axis, bGPDspoint *pt)
void ED_gpencil_project_stroke_to_plane(const Scene *scene, const Object *ob, const RegionView3D *rv3d, bGPDlayer *gpl, bGPDstroke *gps, const float origin[3], const int axis)
void ED_gpencil_project_stroke_to_view(bContext *C, bGPDlayer *gpl, bGPDstroke *gps)
bGPDstroke * ED_gpencil_stroke_join_and_trim(bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps, bGPDstroke *gps_dst, const int pt_index)
bool ED_gpencil_stroke_can_use_direct(const ScrArea *area, const bGPDstroke *gps)
void ED_gpencil_fill_vertex_color_set(ToolSettings *ts, Brush *brush, bGPDstroke *gps)
bool ED_gpencil_stroke_check_collision(GP_SpaceConversion *gsc, bGPDstroke *gps, const float mouse[2], const int radius, const float diff_mat[4][4])
void ED_gpencil_toggle_brush_cursor(bContext *C, bool enable, void *customdata)
void ED_gpencil_init_random_settings(Brush *brush, const int mval[2], GpRandomSettings *random_settings)
bGPdata ** ED_gpencil_data_get_pointers(const bContext *C, PointerRNA *r_ptr)
void ED_gpencil_sbuffer_update_eval(bGPdata *gpd, Object *ob_eval)
void ED_gpencil_point_vertex_color_set(ToolSettings *ts, Brush *brush, bGPDspoint *pt, tGPspoint *tpt)
void ED_gpencil_tpoint_to_point(ARegion *region, float origin[3], const tGPspoint *tpt, bGPDspoint *pt)
void ED_gpencil_drawing_reference_get(const Scene *scene, const Object *ob, char align_flag, float r_vec[3])
bool ED_gpencil_data_owner_is_annotation(PointerRNA *owner_ptr)
void ED_gpencil_sbuffer_vertex_color_set(Depsgraph *depsgraph, Object *ob, ToolSettings *ts, Brush *brush, Material *material, float random_color[3], float pen_pressure)
bGPDstroke * ED_gpencil_stroke_nearest_to_ends(bContext *C, GP_SpaceConversion *gsc, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps, const float radius, int *r_index)
tGPspoint * ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array, int *buffer_size, int *buffer_used, const bool clear)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
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)
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_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct CurveMapping * curve_sensitivity
struct CurveMapping * curve_strength
struct CurveMapping * curve_jitter
struct CurveMapping * curve_rand_pressure
struct CurveMapping * curve_rand_strength
struct CurveMapping * curve_rand_saturation
struct CurveMapping * curve_rand_hue
float draw_random_strength
struct CurveMapping * curve_rand_uv
struct CurveMapping * curve_rand_value
float smooth_stroke_factor
struct BrushGpencilSettings * gpencil_settings
struct Object * reference_object
struct GP_Sculpt_Guide guide
struct ToolSettings * toolsettings
unsigned short local_view_uuid
struct MDeformVert * dvert
eGPencil_PaintStatus status
eGPencil_PaintModes paintmode
eGPencil_PaintFlags flags
GpRandomSettings random_settings
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)
long int PIL_check_seconds_timer_i(void)
ccl_device_inline float distance(const float2 &a, const float2 &b)
ccl_device_inline float2 fabs(const float2 &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)
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)