49#include "RNA_prototypes.hh"
59#define DEPTH_INVALID 1.0f
171 float custom_color[4];
187#define MIN_MANHATTAN_PX (U.gp_manhattandist)
189#define MIN_EUCLIDEAN_PX (U.gp_euclideandist)
260 int dx =
int(
fabsf(mval[0] - pmval[0]));
261 int dy =
int(
fabsf(mval[1] - pmval[1]));
389 if ((num_points < 3) || (idx < 3) || (inf == 0.0f)) {
399 tGPspoint *pta = idx >= 4 ? &points[idx - 4] :
nullptr;
400 tGPspoint *ptb = idx >= 3 ? &points[idx - 3] :
nullptr;
401 tGPspoint *ptc = idx >= 2 ? &points[idx - 2] :
nullptr;
404 float sco[2] = {0.0f};
405 float a[2],
b[2], c[2], d[2];
406 const float average_fac = 1.0f /
steps;
432 const float ref_point[2],
433 const float dir_cw[2],
434 const float dir_ccw[2],
438 stroke_points[0] = ref_point[0] + dir_cw[0] * length * sign;
439 stroke_points[1] = ref_point[1] + dir_cw[1] * length * sign;
440 stroke_points[2] = ref_point[0] + dir_ccw[0] * length * sign;
441 stroke_points[3] = ref_point[1] + dir_ccw[1] * length * sign;
445 const float stroke_dir[2],
447 float stroke_points[8],
448 const int arrow_style)
450 const int arrow_length = 8;
454 const float inv_norm_dir_clockwise[2] = {norm_dir[1], -norm_dir[0]};
455 const float inv_norm_dir_counterclockwise[2] = {-norm_dir[1], norm_dir[0]};
457 switch (arrow_style) {
460 stroke_points[0] = corner[0] + inv_norm_dir_clockwise[0] * arrow_length + norm_dir[0];
461 stroke_points[1] = corner[1] + inv_norm_dir_clockwise[1] * arrow_length + norm_dir[1];
462 stroke_points[2] = corner[0] + inv_norm_dir_counterclockwise[0] * arrow_length + norm_dir[0];
463 stroke_points[3] = corner[1] + inv_norm_dir_counterclockwise[1] * arrow_length + norm_dir[1];
468 inv_norm_dir_clockwise,
469 inv_norm_dir_counterclockwise,
475 if (point !=
nullptr) {
481 inv_norm_dir_clockwise,
482 inv_norm_dir_counterclockwise,
485 stroke_points[4] = corner[0] - norm_dir[0];
486 stroke_points[5] = corner[1] - norm_dir[1];
489 mul_v2_fl(norm_dir, arrow_length * 1.5f);
490 if (point !=
nullptr) {
496 inv_norm_dir_clockwise,
497 inv_norm_dir_counterclockwise,
498 arrow_length * 0.75f,
500 stroke_points[4] = stroke_points[0] - norm_dir[0];
501 stroke_points[5] = stroke_points[1] - norm_dir[1];
502 stroke_points[6] = stroke_points[2] - norm_dir[0];
503 stroke_points[7] = stroke_points[3] - norm_dir[1];
565 const float e_heading[2] = {start[0] - end[0], start[1] - end[1]};
572 const float s_heading[2] = {end[0] - start[0], end[1] - start[1]};
610 for (
int s = 0; s < 3; s++) {
708 const float real_co[2] = {co[co_idx], co[co_idx + 1]};
726 const float corner_point[3],
727 const float arrow_points[8])
739 const float arrow_points[8])
749 const float arrow_points[8])
763 const float corner_point[3],
764 const float arrow_points[8])
783 const float arrow_points[8],
786 float corner_conv[3];
965 float *depth_arr =
nullptr;
969 int mval_i[2], mval_prev[2] = {0};
970 int interp_depth = 0;
973 depth_arr =
static_cast<float *
>(
985 depths, mval_i, mval_prev, depth_margin + 1, depth_arr + i) == 0)))
996 if (found_depth ==
false) {
1000 depth_arr[i] = 0.9999f;
1006 int first_valid = 0;
1024 for (i = first_valid + 1; i < last_valid; i++) {
1028 interp_depth =
true;
1051 pt->
time = ptc->time;
1095 const int mval_i[2] = {
x, y};
1105 if (depth_pt > depth_mval) {
1117 const float mval[2],
1148 bool do_cull =
false;
1156 for (
int i = 0; i < gps->
totpoints; i++) {
1158 pt->
flag &= ~GP_SPOINT_TAG;
1165 for (
int i = 0; (i + 1) < gps->
totpoints; i++) {
1168 pt2 = gps->
points + i + 1;
1277 if (curarea ==
nullptr) {
1305 if (region->regiondata ==
nullptr) {
1317 p->
v2d = ®ion->v2d;
1327 p->
v2d = ®ion->v2d;
1343 p->
v2d = ®ion->v2d;
1351 if (clip ==
nullptr) {
1359 p->
v2d = ®ion->v2d;
1378 p->
imat[3][0] -= marker->
pos[0];
1379 p->
imat[3][1] -= marker->
pos[1];
1406 if (*gpd_ptr ==
nullptr) {
1432 switch (area->spacetype) {
1502 if (gpd ==
nullptr) {
1540 if (p->
gpl ==
nullptr) {
1562 bool has_layer_to_erase =
false;
1567 has_layer_to_erase =
true;
1574 if (has_layer_to_erase ==
false) {
1576 printf(
"Error: Eraser will not be affecting anything (gpencil_paint_init)\n");
1593 if (p->
gpf ==
nullptr) {
1619 p->
flags &= ~GP_PAINTFLAG_V3D_ERASER_DEPTH;
1728 p->
gpf->
flag &= ~GP_FRAME_PAINT;
1754 float viewport_size[4];
1756 immUniform2f(
"viewport_size", viewport_size[2], viewport_size[3]);
1802 if (totpoints < 2) {
1805 const tGPspoint *pt = &points[totpoints - 1];
1813 const float color[3] = {1.0f, 0.39f, 0.39f};
1817 const float radius = 4.0f;
1930 if (event !=
nullptr) {
1965 IFACE_(
"Annotation Create Poly: LMB click to place next stroke vertex | "
1966 "ESC/Enter to end (or click outside this area)"));
1981 IFACE_(
"Annotation Eraser: Hold and drag LMB or RMB to erase | "
1982 "ESC/Enter to end (or click outside this area)"));
1986 IFACE_(
"Annotation Line Draw: Hold and drag LMB to draw | "
1987 "ESC/Enter to end (or click outside this area)"));
1991 IFACE_(
"Annotation Freehand Draw: Hold and drag LMB to draw | "
1992 "E/ESC/Enter to end (or click outside this area)"));
1997 IFACE_(
"Annotation Create Poly: LMB click to place next stroke vertex | "
1998 "ESC/Enter to end (or click outside this area)"));
2003 C,
IFACE_(
"Annotation Session: ESC/Enter to end (or click outside this area)"));
2038 float last_mouse[2];
2108 p->
flags &= ~GP_PAINTFLAG_USE_STABILIZER_TEMP;
2122 if ((dx > 0) || (dy > 0)) {
2152 p->
flags &= ~GP_PAINTFLAG_USE_STABILIZER_TEMP;
2160 p->
pressure =
event->tablet.pressure;
2176 p->
flags &= ~GP_PAINTFLAG_FIRSTRUN;
2208 mousef[0] = p->
mval[0];
2209 mousef[1] = p->
mval[1];
2268 p->
flags &= ~GP_PAINTFLAG_FIRSTRUN;
2388 printf(
"\t\t\tGP - wrong area execution abort!\n");
2402 op->
flag &= ~OP_IS_MODAL_CURSOR_REGION;
2433 float pt[2], a[2],
b[2];
2434 float factor = 10.0f;
2450 else if (dist >= factor) {
2451 int slices = 2 +
int((dist - 1.0) / factor);
2452 float n = 1.0f / slices;
2453 for (
int i = 1; i < slices; i++) {
2597 bool in_bounds =
false;
2607 if (current_region) {
2611 p->
region = current_region;
2682 printf(
"\t\t\t\tGP - add error done!\n");
2697 switch (event->
type) {
2768 "Draw Straight Lines",
2769 "Draw straight line segment(s)"},
2774 "Click to place endpoints of straight line segments (connected)"},
2776 {0,
nullptr, 0,
nullptr,
nullptr},
2784 "ARROW_OPEN_INVERTED",
2787 "Use perpendicular segment style"},
2789 {0,
nullptr, 0,
nullptr,
nullptr},
2797 ot->
name =
"Annotation Draw";
2798 ot->
idname =
"GPENCIL_OT_annotate";
2817 ot->
srna,
"arrowstyle_start",
arrow_types, 0,
"Start Arrow Style",
"Stroke start style");
2819 ot->
srna,
"arrowstyle_end",
arrow_types, 0,
"End Arrow Style",
"Stroke end style");
2824 "Helper to draw smooth and clean lines. Press Shift for an invert effect "
2825 "(even if this option is not active)");
2827 "stabilizer_factor",
2831 "Stabilizer Stroke Factor",
2832 "Higher values gives a smoother stroke",
2836 "stabilizer_radius",
2840 "Stabilizer Stroke Radius",
2841 "Minimum distance from last point before stroke continues",
2855 "Wait for first click instead of painting immediately");
@ BKE_CB_EVT_ANNOTATION_POST
@ BKE_CB_EVT_ANNOTATION_PRE
void BKE_callback_exec_id_depsgraph(Main *bmain, ID *id, Depsgraph *depsgraph, eCbEvent evt)
bScreen * CTX_wm_screen(const bContext *C)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ToolSettings * CTX_data_tool_settings(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
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_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)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
struct bGPDstroke * BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src, bool dup_points, bool dup_curve)
#define GPENCIL_STRENGTH_MIN
struct bGPdata * BKE_gpencil_data_addnew(struct Main *bmain, const char name[])
void BKE_report(ReportList *reports, eReportType type, const char *message)
ARegion * BKE_area_find_region_xy(const ScrArea *area, int regiontype, const int xy[2]) ATTR_NONNULL(3)
struct MovieTrackingMarker * BKE_tracking_marker_get(struct MovieTrackingTrack *track, int framenr)
struct MovieTrackingObject * BKE_tracking_object_get_active(const struct MovieTracking *tracking)
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])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
bool invert_m4_m4(float inverse[4][4], const float mat[4][4])
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 float len_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
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 normalize_v2(float n[2])
MINLINE void zero_v3(float r[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
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)
Platform independent time functions.
double BLI_time_now_seconds(void)
#define ENUM_OPERATORS(_type, _max)
typedef double(DMatrix)[4][4]
@ 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_PROJECT_DEPTH_ONLY_SELECTED
@ GP_TOOL_FLAG_RETAIN_LAST
@ SEQ_PREVIEW_SHOW_GPENCIL
@ OP_IS_MODAL_CURSOR_REGION
MovieClip * ED_space_clip_get_clip(const SpaceClip *sc)
int ED_space_clip_get_clip_frame_number(const SpaceClip *sc)
bool ED_operator_regionactive(bContext *C)
const rcti * ED_region_visible_rect(ARegion *region)
void ED_workspace_status_text(bContext *C, const char *str)
void ED_region_tag_redraw(ARegion *region)
bool ED_view3d_depth_read_cached(const ViewDepths *vd, const int mval[2], int margin, float *r_depth)
void view3d_region_operator_needs_opengl(wmWindow *win, ARegion *region)
bool ED_view3d_depth_read_cached_seg(const ViewDepths *vd, const int mval_sta[2], const int mval_end[2], int margin, float *r_depth)
float ED_view3d_calc_depth_for_comparison(const RegionView3D *rv3d, const float co[3])
void ED_view3d_depth_override(Depsgraph *depsgraph, ARegion *region, View3D *v3d, Object *obact, eV3DDepthOverrideMode mode, ViewDepths **r_depths)
void ED_view3d_win_to_delta(const ARegion *region, const float xy_delta[2], float zfac, float r_out[3])
float ED_view3d_calc_zfac(const RegionView3D *rv3d, const float co[3])
void ED_view3d_depths_free(ViewDepths *depths)
@ V3D_DEPTH_SELECTED_ONLY
bool ED_view3d_autodist_simple(ARegion *region, const int mval[2], float mouse_worldloc[3], int margin, const float *force_depth)
void ED_view3d_calc_camera_border(const Scene *scene, const Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const RegionView3D *rv3d, bool no_shift, rctf *r_viewborder)
bool ED_view3d_depth_unproject_v3(const ARegion *region, const int mval[2], double depth, float r_location_world[3])
eV3DProjStatus ED_view3d_project_float_global(const ARegion *region, const float co[3], float r_co[2], eV3DProjTest flag)
@ GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR
@ GPU_SHADER_3D_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)
#define RNA_BEGIN(sptr, itemptr, propname)
void UI_view2d_region_to_view(const 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_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 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 tGPsdata * annotation_stroke_begin(bContext *C, wmOperator *op)
static void annotation_draw_cancel(bContext *C, wmOperator *op)
static void annotation_stroke_convertcoords(tGPsdata *p, const float mval[2], float out[3], const float *depth)
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 tGPsdata * annotation_session_initpaint(bContext *C)
static void annotation_session_free(tGPsdata *p)
static void annotation_stroke_arrow_init_point_default(bGPDspoint *pt)
static void annotation_draw_eraser(bContext *, int x, int y, void *p_ptr)
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])
local_group_size(16, 16) .push_constant(Type b
const Depsgraph * depsgraph
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void gpencil_undo_push(bGPdata *gpd)
void gpencil_undo_init(bGPdata *gpd)
@ GP_PAINTMODE_DRAW_STRAIGHT
void gpencil_undo_finish()
void gpencil_point_to_xy(const GP_SpaceConversion *gsc, const bGPDstroke *gps, const bGPDspoint *pt, int *r_x, int *r_y)
bool gpencil_stroke_inside_circle(const float mval[2], int rad, int x0, int y0, int x1, int y1)
int ED_gpencil_session_active()
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_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
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, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int 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)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
MovieTrackingTrack * active_track
struct ToolSettings * toolsettings
struct MDeformVert * dvert
eGPencil_PaintStatus status
eGPencil_PaintModes paintmode
eGPencil_PaintFlags flags
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* cancel)(bContext *C, wmOperator *op)
struct ReportList * reports
ccl_device_inline int abs(int x)
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_BUTTON(event_type)
#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)