55 #include "RNA_prototypes.h"
67 #define DEPTH_INVALID 1.0f
194 #define MIN_MANHATTAN_PX (U.gp_manhattandist)
196 #define MIN_EUCLIDEAN_PX (U.gp_euclideandist)
267 int dx = (int)
fabsf(mval[0] - pmval[0]);
268 int dy = (int)
fabsf(mval[1] - pmval[1]);
394 if ((num_points < 3) || (idx < 3) || (inf == 0.0f)) {
409 float sco[2] = {0.0f};
410 float a[2],
b[2],
c[2], d[2];
411 const float average_fac = 1.0f /
steps;
437 const float ref_point[2],
438 const float dir_cw[2],
439 const float dir_ccw[2],
443 stroke_points[0] = ref_point[0] + dir_cw[0] *
length *
sign;
444 stroke_points[1] = ref_point[1] + dir_cw[1] *
length *
sign;
445 stroke_points[2] = ref_point[0] + dir_ccw[0] *
length *
sign;
446 stroke_points[3] = ref_point[1] + dir_ccw[1] *
length *
sign;
450 const float stroke_dir[2],
452 float stroke_points[8],
453 const int arrow_style)
455 const int arrow_length = 8;
459 const float inv_norm_dir_clockwise[2] = {norm_dir[1], -norm_dir[0]};
460 const float inv_norm_dir_counterclockwise[2] = {-norm_dir[1], norm_dir[0]};
462 switch (arrow_style) {
465 stroke_points[0] =
corner[0] + inv_norm_dir_clockwise[0] * arrow_length + norm_dir[0];
466 stroke_points[1] =
corner[1] + inv_norm_dir_clockwise[1] * arrow_length + norm_dir[1];
467 stroke_points[2] =
corner[0] + inv_norm_dir_counterclockwise[0] * arrow_length + norm_dir[0];
468 stroke_points[3] =
corner[1] + inv_norm_dir_counterclockwise[1] * arrow_length + norm_dir[1];
473 inv_norm_dir_clockwise,
474 inv_norm_dir_counterclockwise,
486 inv_norm_dir_clockwise,
487 inv_norm_dir_counterclockwise,
490 stroke_points[4] =
corner[0] - norm_dir[0];
491 stroke_points[5] =
corner[1] - norm_dir[1];
494 mul_v2_fl(norm_dir, arrow_length * 1.5f);
501 inv_norm_dir_clockwise,
502 inv_norm_dir_counterclockwise,
503 arrow_length * 0.75f,
505 stroke_points[4] = stroke_points[0] - norm_dir[0];
506 stroke_points[5] = stroke_points[1] - norm_dir[1];
507 stroke_points[6] = stroke_points[2] - norm_dir[0];
508 stroke_points[7] = stroke_points[3] - norm_dir[1];
570 const float e_heading[2] = {start[0] - end[0], start[1] - end[1]};
577 const float s_heading[2] = {end[0] - start[0], end[1] - start[1]};
612 for (
int s = 0; s < 3; s++) {
705 const float real_co[2] = {co[co_idx], co[co_idx + 1]};
722 const float corner_point[3],
723 const float arrow_points[8])
735 const float arrow_points[8])
745 const float arrow_points[8])
759 const float corner_point[3],
760 const float arrow_points[8])
779 const float arrow_points[8],
782 float corner_conv[3];
958 float *depth_arr =
NULL;
962 int mval_i[2], mval_prev[2] = {0};
963 int interp_depth = 0;
969 for (i = 0, ptc = gpd->
runtime.
sbuffer; i < gpd->runtime.sbuffer_used; i++, ptc++, pt++) {
974 depths, mval_i, mval_prev, depth_margin + 1, depth_arr + i) == 0))) {
984 if (found_depth ==
false) {
988 depth_arr[i] = 0.9999f;
1012 for (i = first_valid + 1; i < last_valid; i++) {
1016 interp_depth =
true;
1028 for (i = 0, ptc = gpd->
runtime.
sbuffer; i < gpd->runtime.sbuffer_used && ptc;
1081 const int mval_i[2] = {
x,
y};
1091 if (depth_pt > depth_mval) {
1103 const float mval[2],
1134 bool do_cull =
false;
1142 for (
int i = 0; i < gps->
totpoints; i++) {
1151 for (
int i = 0; (i + 1) < gps->
totpoints; i++) {
1154 pt2 = gps->
points + i + 1;
1259 if (curarea ==
NULL) {
1358 p->
imat[3][0] -= marker->
pos[0];
1359 p->
imat[3][1] -= marker->
pos[1];
1386 if (*gpd_ptr ==
NULL) {
1412 switch (
area->spacetype) {
1542 bool has_layer_to_erase =
false;
1547 has_layer_to_erase =
true;
1554 if (has_layer_to_erase ==
false) {
1556 printf(
"Error: Eraser will not be affecting anything (gpencil_paint_init)\n");
1730 float viewport_size[4];
1732 immUniform2f(
"viewport_size", viewport_size[2], viewport_size[3]);
1778 if (totpoints < 2) {
1781 const tGPspoint *pt = &points[totpoints - 1];
1789 const float color[3] = {1.0f, 0.39f, 0.39f};
1793 const float radius = 4.0f;
1906 if (event !=
NULL) {
1941 TIP_(
"Annotation Create Poly: LMB click to place next stroke vertex | "
1942 "ESC/Enter to end (or click outside this area)"));
1957 TIP_(
"Annotation Eraser: Hold and drag LMB or RMB to erase | "
1958 "ESC/Enter to end (or click outside this area)"));
1962 TIP_(
"Annotation Line Draw: Hold and drag LMB to draw | "
1963 "ESC/Enter to end (or click outside this area)"));
1967 TIP_(
"Annotation Freehand Draw: Hold and drag LMB to draw | "
1968 "E/ESC/Enter to end (or click outside this area)"));
1973 TIP_(
"Annotation Create Poly: LMB click to place next stroke vertex | "
1974 "ESC/Enter to end (or click outside this area)"));
1979 C,
TIP_(
"Annotation Session: ESC/Enter to end (or click outside this area)"));
2014 float last_mouse[2];
2075 p->
mval[1] = (
float)
event->mval[1] -
y;
2098 if ((dx > 0) || (dy > 0)) {
2136 p->
pressure =
event->tablet.pressure;
2184 mousef[0] = p->
mval[0];
2185 mousef[1] = p->
mval[1];
2226 p->
mval[0] = (int)mousef[0];
2227 p->
mval[1] = (int)mousef[1];
2364 printf(
"\t\t\tGP - wrong area execution abort!\n");
2409 float pt[2],
a[2],
b[2];
2410 float factor = 10.0f;
2414 b[1] = (
float)
event->mval[1] + 1.0f;
2426 else if (dist >= factor) {
2427 int slices = 2 + (int)((dist - 1.0) / factor);
2428 float n = 1.0f / slices;
2429 for (
int i = 1; i < slices; i++) {
2570 bool in_bounds =
false;
2580 if (current_region) {
2584 p->
region = current_region;
2655 printf(
"\t\t\t\tGP - add error done!\n");
2669 switch (event->
type) {
2740 "Draw Straight Lines",
2741 "Draw straight line segment(s)"},
2746 "Click to place endpoints of straight line segments (connected)"},
2756 "ARROW_OPEN_INVERTED",
2759 "Use perpendicular segment style"},
2769 ot->
name =
"Annotation Draw";
2770 ot->
idname =
"GPENCIL_OT_annotate";
2789 ot->
srna,
"arrowstyle_start",
arrow_types, 0,
"Start Arrow Style",
"Stroke start style");
2791 ot->
srna,
"arrowstyle_end",
arrow_types, 0,
"End Arrow Style",
"Stroke end style");
2796 "Helper to draw smooth and clean lines. Press Shift for an invert effect "
2797 "(even if this option is not active)");
2799 "stabilizer_factor",
2803 "Stabilizer Stroke Factor",
2804 "Higher values gives a smoother stroke",
2808 "stabilizer_radius",
2812 "Stabilizer Stroke Radius",
2813 "Minimum distance from last point before stroke continues",
2827 "Wait for first click instead of painting immediately");
typedef float(TangentPoint)[2]
void BKE_callback_exec_id_depsgraph(struct Main *bmain, struct ID *id, struct Depsgraph *depsgraph, eCbEvent evt)
@ BKE_CB_EVT_ANNOTATION_POST
@ BKE_CB_EVT_ANNOTATION_PRE
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 bGPDstroke * BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src, bool dup_points, bool dup_curve)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
void BKE_gpencil_free_stroke_weights(struct bGPDstroke *gps)
struct bGPDlayer * BKE_gpencil_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive, bool add_to_header)
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_delete_tagged_points(struct bGPdata *gpd, struct bGPDframe *gpf, struct bGPDstroke *gps, struct bGPDstroke *next_stroke, int tag_flags, bool select, bool flat_cap, int limit)
void BKE_report(ReportList *reports, eReportType type, const char *message)
struct ARegion * BKE_area_find_region_xy(struct ScrArea *area, int regiontype, const int xy[2]) ATTR_NONNULL(3)
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, int list_size, 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])
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)
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], 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 void add_v2_v2(float r[2], const float a[2])
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, int x, 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
@ SEQ_PREVIEW_SHOW_GPENCIL
#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)
bool ED_view3d_depth_read_cached(const ViewDepths *vd, const int mval[2], int margin, float *r_depth)
void ED_view3d_win_to_delta(const struct ARegion *region, const float xy_delta[2], float zfac, float r_out[3])
eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
bool ED_view3d_depth_read_cached_seg(const ViewDepths *vd, const int mval_sta[2], const int mval_end[2], int margin, float *depth)
void ED_view3d_depths_free(ViewDepths *depths)
float ED_view3d_calc_zfac(const struct RegionView3D *rv3d, const float co[3])
bool ED_view3d_depth_unproject_v3(const struct ARegion *region, const int mval[2], double depth, float r_location_world[3])
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)
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, bool no_shift)
void ED_view3d_depth_override(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, struct Object *obact, eV3DDepthOverrideMode mode, struct ViewDepths **r_depths)
float ED_view3d_calc_depth_for_comparison(const struct RegionView3D *rv3d, const float co[3])
_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 Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
Platform independent time functions.
#define RNA_BEGIN(sptr, itemptr, propname)
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 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])
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])
T length(const vec_base< T, Size > &a)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
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)
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
void WM_event_drag_start_mval_fl(const wmEvent *event, const ARegion *region, float r_mval[2])
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
#define ISMOUSE_MOTION(event_type)
#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)