121 const float diff_mat[4][4],
156 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
166 if (gps->editcurve !=
NULL) {
183 for (
int i = 0; i < gps->
totpoints; i++) {
208 if (deselect ==
false) {
218 if (deselect ==
false) {
296 ot->
name =
"(De)select All Strokes";
297 ot->
idname =
"GPENCIL_OT_select_all";
298 ot->
description =
"Change selection of all Grease Pencil strokes currently visible";
335 for (
int i = 0; i < gpc->tot_curve_points; i++) {
352 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
374 ot->
name =
"Select Linked";
375 ot->
idname =
"GPENCIL_OT_select_linked";
376 ot->
description =
"Select all points in same strokes as already selected points";
408 bool changed =
false;
419 for (
int i = start; i < gpc->tot_curve_points; i++) {
421 if ((idx % 2) == 0) {
437 gpc_pt = &gpc->curve_points[gpc->tot_curve_points - 1];
459 for (
int i = start; i < gps->totpoints; i++) {
460 pt = &gps->points[i];
461 if ((row % 2) == 0) {
472 pt = &gps->points[0];
475 pt = &gps->points[gps->totpoints - 1];
503 ot->
idname =
"GPENCIL_OT_select_alternate";
504 ot->
description =
"Select alternative points in same strokes as already selected points";
518 "Do not select the first and last point of the stroke");
540 const int start = (unselect_ends) ? 1 : 0;
554 bool changed =
false;
555 int seed_iter =
seed;
574 seed_iter += gps->totpoints + stroke_idx;
580 bool select_stroke = ((gps->totpoints * randfac) <= j) ? true :
false;
588 int elem_map_len = 0;
592 for (
int i = start; i < gpc->tot_curve_points; i++) {
594 elem_map[elem_map_len++] = gpc_pt;
598 const int count_select = elem_map_len * randfac;
599 for (
int i = 0; i < count_select; i++) {
618 gpc_pt = &gpc->curve_points[gpc->tot_curve_points - 1];
645 seed_iter += gps->totpoints + stroke_idx;
651 bool select_stroke = ((gps->totpoints * randfac) <= j) ? true :
false;
658 int elem_map_len = 0;
661 for (
int i = start; i < gps->totpoints; i++) {
662 pt = &gps->points[i];
663 elem_map[elem_map_len++] = pt;
667 const int count_select = elem_map_len * randfac;
668 for (
int i = 0; i < count_select; i++) {
681 pt = &gps->points[0];
684 pt = &gps->points[gps->totpoints - 1];
714 ot->
idname =
"GPENCIL_OT_select_random";
715 ot->
description =
"Select random points for non selected strokes";
730 "Do not select the first and last point of the stroke");
760 bool changed =
false;
805 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
831 bool changed =
false;
846 if (gps->editcurve !=
NULL &&
870 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
884 if (selected_colors !=
NULL) {
902 bool changed =
false;
939 ot->
name =
"Select Grouped";
940 ot->
idname =
"GPENCIL_OT_select_grouped";
941 ot->
description =
"Select all strokes with similar characteristics";
975 bool changed =
false;
986 if (gps->editcurve !=
NULL) {
994 if ((extend ==
false) && (gps->totpoints > 1)) {
1010 if ((extend ==
false) && (gps->totpoints > 1)) {
1015 for (; i < gps->totpoints; i++, pt++) {
1041 ot->
name =
"Select First";
1042 ot->
idname =
"GPENCIL_OT_select_first";
1043 ot->
description =
"Select first point in Grease Pencil strokes";
1054 "only_selected_strokes",
1056 "Selected Strokes Only",
1057 "Only select the first point of strokes that already have points selected");
1063 "Extend selection instead of deselecting all other selected points");
1085 bool changed =
false;
1095 if (is_curve_edit) {
1096 if (gps->editcurve !=
NULL) {
1103 if ((extend ==
false) && (gps->totpoints > 1)) {
1119 if ((extend ==
false) && (gps->totpoints > 1)) {
1124 for (; i < gps->totpoints - 1; i++, pt++) {
1151 ot->
name =
"Select Last";
1152 ot->
idname =
"GPENCIL_OT_select_last";
1153 ot->
description =
"Select last point in Grease Pencil strokes";
1164 "only_selected_strokes",
1166 "Selected Strokes Only",
1167 "Only select the last point of strokes that already have points selected");
1173 "Extend selection instead of deselecting all other selected points");
1191 bool changed =
false;
1192 if (is_curve_edit) {
1197 bool prev_sel =
false;
1249 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
1268 for (pt -= 1; i > 0; i--, pt--) {
1303 ot->
name =
"Select More";
1304 ot->
idname =
"GPENCIL_OT_select_more";
1305 ot->
description =
"Grow sets of selected Grease Pencil points";
1331 bool changed =
false;
1332 if (is_curve_edit) {
1338 bool prev_sel =
false;
1344 if (prev_sel ==
false) {
1366 if (prev_sel ==
false) {
1394 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
1397 if (prev_sel ==
false) {
1413 for (pt -= 1; i > 0; i--, pt--) {
1416 if (prev_sel ==
false) {
1449 ot->
name =
"Select Less";
1450 ot->
idname =
"GPENCIL_OT_select_less";
1451 ot->
description =
"Shrink sets of selected Grease Pencil points";
1483 const float diff_mat[4][4],
1484 const int selectmode,
1486 const bool is_curve_edit)
1491 bool changed =
false;
1496 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
1506 if (((x0 - mx) * (x0 - mx) + (y0 - my) * (y0 - my)) <= radius * radius) {
1528 float r_hita[3], r_hitb[3];
1531 gpd, gpl, gps_active, pt_active, hit_select,
false, scale, r_hita, r_hitb);
1539 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
1553 if (is_curve_edit && hit && gps_active->
editcurve ==
NULL) {
1576 const float diff_mat[4][4],
1577 const int selectmode)
1591 if (bezt->
hide == 1) {
1599 int from = (!handles_visible) ? 1 : 0;
1600 int to = (!handles_visible) ? 2 : 3;
1602 for (
int j =
from; j < to; j++) {
1620 int dist_x = screen_co[0] - mx;
1621 int dist_y = screen_co[1] - my;
1622 int dist = dist_x * dist_x + dist_y * dist_y;
1623 if (dist <= radius * radius) {
1703 bool changed =
false;
1706 rect.
xmin = mx - radius;
1707 rect.
ymin = my - radius;
1708 rect.
xmax = mx + radius;
1709 rect.
ymax = my + radius;
1711 if (is_curve_edit) {
1720 C, gps, gpc, mx, my, radius,
select, &rect, gps_iter.diff_mat, selectmode);
1725 if (changed ==
false) {
1746 gpstroke_iter.diff_mat,
1771 ot->
name =
"Circle Select";
1772 ot->
description =
"Select Grease Pencil strokes using brush selection";
1773 ot->
idname =
"GPENCIL_OT_select_circle";
1808 const float diff_mat[4][4],
1813 static bool gpencil_stroke_fill_isect_rect(
ARegion *region,
1815 const float diff_mat[4][4],
1818 int min[2] = {-INT_MAX, -INT_MAX};
1819 int max[2] = {INT_MAX, INT_MAX};
1823 for (
int i = 0; i < gps->
totpoints; i++) {
1825 int *pt2d = points2d[i];
1840 int pt1[2], pt2[2], pt3[2];
1841 int tri_min[2] = {-INT_MAX, -INT_MAX};
1842 int tri_max[2] = {INT_MAX, INT_MAX};
1852 rcti tri_bb = {tri_min[0], tri_max[0], tri_min[1], tri_max[1]};
1881 const bool strokemode,
1891 bool changed =
false;
1896 bool any_select =
false;
1897 for (
int i = 0; i < gpc->tot_curve_points; i++) {
1901 if (bezt->
hide == 1) {
1905 const bool handles_visible = (handle_all || (handle_only_selected &&
1908 if (handles_visible) {
1909 for (
int j = 0; j < 3; j++) {
1921 if (sel_op_result != -1) {
1922 if (sel_op_result) {
1945 const bool is_select = bezt->
f2;
1955 if (sel_op_result != -1) {
1956 if (sel_op_result) {
1987 whole = gpencil_stroke_fill_isect_rect(region, gps, gps_iter.diff_mat, box);
1991 if (strokemode || whole) {
1993 if (sel_op_result != -1) {
1994 for (
int i = 0; i < gpc->tot_curve_points; i++) {
1998 if (sel_op_result) {
2008 if (sel_op_result) {
2031 const bool strokemode,
2032 const bool segmentmode,
2035 const bool is_curve_edit)
2038 bool changed =
false;
2051 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2071 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2077 if (strokemode ==
false) {
2080 if (sel_op_result != -1) {
2088 float r_hita[3], r_hitb[3];
2090 gpd, gpl, gps_active, pt_active, hit_select,
false, scale, r_hita, r_hitb);
2111 mval[0] = (box.
xmax + box.
xmin) / 2;
2112 mval[1] = (box.
ymax + box.
ymin) / 2;
2118 if ((strokemode) || (whole)) {
2122 if (sel_op_result != -1) {
2123 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2126 if (sel_op_result) {
2138 if (is_curve_edit && (hit || whole) && gps_active->
editcurve ==
NULL) {
2186 bool changed =
false;
2194 if (is_curve_edit) {
2196 C, ob, is_inside_fn, box,
user_data, strokemode, sel_op);
2199 if (changed ==
false) {
2240 const float diff_mat[4][4],
2263 ot->
description =
"Select Grease Pencil strokes within a rectangular region";
2264 ot->
idname =
"GPENCIL_OT_select_box";
2289 const float diff_mat[4][4],
2326 ot->
name =
"Lasso Select Strokes";
2327 ot->
description =
"Select Grease Pencil strokes using lasso selection";
2328 ot->
idname =
"GPENCIL_OT_select_lasso";
2352 const int radius_squared,
2363 int hit_distance = radius_squared;
2367 for (
int i = 0; i < gpc->tot_curve_points; i++) {
2371 if (bezt->
hide == 1) {
2379 int from = (!handles_visible) ? 1 : 0;
2380 int to = (!handles_visible) ? 2 : 3;
2382 for (
int j =
from; j < to; j++) {
2387 if (pt_distance <= radius_squared && pt_distance < hit_distance) {
2393 hit_distance = pt_distance;
2412 const float radius = 0.4f *
U.widget_unit;
2420 const bool deselect_all =
RNA_boolean_get(op->
ptr,
"deselect_all") && !use_shift_extend;
2433 char hit_curve_handle = 0;
2434 int hit_distance = radius_squared;
2455 if (is_curve_edit) {
2466 if (hit_curve ==
NULL) {
2477 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2489 if (pt_distance <= radius_squared) {
2491 if (pt_distance < hit_distance) {
2493 hit_stroke = gps_active;
2495 hit_distance = pt_distance;
2505 if (!hit_curve && !hit_curve_point && !hit_point && !hit_stroke) {
2524 if (is_curve_edit && hit_point !=
NULL) {
2531 if (hit_curve_point !=
NULL) {
2533 if ((bezt->
f1 &
SELECT) && (hit_curve_handle == 0)) {
2536 if ((bezt->
f2 &
SELECT) && (hit_curve_handle == 1)) {
2539 if ((bezt->
f3 &
SELECT) && (hit_curve_handle == 2)) {
2549 if (extend ==
false) {
2556 if (is_curve_edit && hit_curve ==
NULL) {
2563 if (hit_curve !=
NULL) {
2571 for (i = 0, pt = hit_stroke->
points; i < hit_stroke->totpoints; i++, pt++) {
2572 if (deselect ==
false) {
2581 if (deselect ==
false) {
2593 if (deselect ==
false) {
2594 if (hit_curve_point !=
NULL) {
2620 float r_hita[3], r_hitb[3];
2623 gpd, hit_layer, hit_stroke, hit_point, hit_select,
false, scale, r_hita, r_hitb);
2628 if (hit_curve_point !=
NULL) {
2646 if (hit_curve_point !=
NULL || hit_point !=
NULL) {
2678 ot->
description =
"Select Grease Pencil strokes and/or stroke points";
2697 "Select entire strokes instead of just the nearest stroke vertex");
2743 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2749 uint key = truncf(hsv[0] * range);
2793 bool changed =
false;
2809 bool gps_selected =
false;
2811 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2820 uint key = truncf(hsv[0] * range);
2824 gps_selected =
true;
2836 for (i = 0, pt1 = gps->points; i < gps->totpoints; i++, pt1++) {
2856 if (hue_table !=
NULL) {
2868 ot->
name =
"Select Vertex Color";
2869 ot->
idname =
"GPENCIL_OT_select_vertex_color";
2870 ot->
description =
"Select all points with similar vertex color of current selected";
2887 "Tolerance of the selection. Higher values select a wider range of similar colors",
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
struct Object * CTX_data_active_object(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
void BKE_gpencil_curve_sync_selection(struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_stroke_select_index_set(struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_stroke_select_index_reset(struct bGPDstroke *gps)
bool BKE_gpencil_stroke_select_check(const struct bGPDstroke *gps)
struct bGPDframe * BKE_gpencil_layer_frame_get(struct bGPDlayer *gpl, int cframe, eGP_GetFrame_Mode addnew)
void BKE_gpencil_stroke_sync_selection(struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_stroke_editcurve_update(struct bGPdata *gpd, struct bGPDlayer *gpl, struct bGPDstroke *gps)
void BKE_gpencil_stroke_geometry_update(struct bGPdata *gpd, struct bGPDstroke *gps)
General operations, lookup, etc. for materials.
struct MaterialGPencilStyle * BKE_gpencil_material_settings(struct Object *ob, short act)
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_assert_msg(a, msg)
bool BLI_ghash_haskey(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
GSet * BLI_gset_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_gset_haskey(const GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
unsigned int BLI_ghash_len(const GHash *gh) ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
bool BLI_gset_add(GSet *gs, void *key)
bool BLI_lasso_is_point_inside(const int mcoords[][2], unsigned int mcoords_len, int sx, int sy, int error_value)
void BLI_lasso_boundbox(struct rcti *rect, const int mcoords[][2], unsigned int mcoords_len)
#define LISTBASE_FOREACH(type, var, list)
void rgb_to_hsv_compat_v(const float rgb[3], float r_hsv[3])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
MINLINE int len_manhattan_v2v2_int(const int a[2], const int b[2]) ATTR_WARN_UNUSED_RESULT
void BLI_rng_free(struct RNG *rng) ATTR_NONNULL(1)
unsigned int BLI_rng_get_uint(struct RNG *rng) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
struct RNG * BLI_rng_new(unsigned int seed)
void BLI_array_randomize(void *data, unsigned int elem_size, unsigned int elem_num, unsigned int seed)
bool BLI_rcti_isect_segment(const struct rcti *rect, const int s1[2], const int s2[2])
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
bool BLI_rcti_isect(const struct rcti *src1, const struct rcti *src2, struct rcti *dest)
bool BLI_rcti_inside_rcti(const rcti *rct_a, const rcti *rct_b)
#define DO_MINMAX2(vec, min, max)
#define POINTER_FROM_INT(i)
#define SET_FLAG_FROM_TEST(value, test, flag)
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_COPY_ON_WRITE
#define BEZT_DESEL_IDX(bezt, i)
#define BEZT_ISSEL_IDX(bezt, i)
#define BEZT_SEL_ALL(bezt)
#define BEZT_ISSEL_ANY(bezt)
#define BEZT_DESEL_ALL(bezt)
#define BEZT_SEL_IDX(bezt, i)
#define GPENCIL_ANY_VERTEX_MASK(flag)
#define GPENCIL_VERTEX_MODE(gpd)
#define GPENCIL_SCULPT_MODE(gpd)
@ GP_STROKE_NEEDS_CURVE_UPDATE
#define GPENCIL_PAINT_MODE(gpd)
#define GPENCIL_NONE_EDIT_MODE(gpd)
#define GPENCIL_ANY_SCULPT_MASK(flag)
@ GP_DATA_STROKE_PAINTMODE
#define GPENCIL_ANY_MODE(gpd)
#define GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)
Object is a sort of wrapper for general info.
eGP_Sculpt_SelectMaskFlag
@ GP_SCULPT_MASK_SELECTMODE_POINT
@ GP_SCULPT_MASK_SELECTMODE_STROKE
@ GP_SCULPT_MASK_SELECTMODE_SEGMENT
@ GP_VERTEX_MASK_SELECTMODE_SEGMENT
@ GP_VERTEX_MASK_SELECTMODE_STROKE
@ GP_VERTEX_MASK_SELECTMODE_POINT
int ED_select_op_action_deselected(eSelectOp sel_op, bool is_select, bool is_inside)
eSelectOp ED_select_op_modal(eSelectOp sel_op, bool is_first)
#define SEL_OP_USE_PRE_DESELECT(sel_op)
void const char * ED_select_pick_get_name(struct wmOperatorType *ot, PointerRNA *ptr)
eV3DProjStatus ED_view3d_project_int_global(const struct ARegion *region, const float co[3], int r_co[2], eV3DProjTest flag)
Read Guarded memory(de)allocation.
@ OPTYPE_DEPENDS_ON_CURSOR
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
static unsigned long seed
static bool is_inside(int x, int y, int cols, int rows)
int gpencil_delete_selected_point_wrap(bContext *C)
#define GP_EDITABLE_CURVES_END(gpstroke_iter)
#define GP_EDITABLE_CURVES_BEGIN(gpstroke_iter, C, gpl, gps, gpc)
void gpencil_point_conversion_init(struct bContext *C, GP_SpaceConversion *r_gsc)
#define GP_EDITABLE_STROKES_BEGIN(gpstroke_iter, C, gpl, gps)
#define GP_EVALUATED_STROKES_BEGIN(gpstroke_iter, C, gpl, gps)
void gpencil_point_to_parent_space(const bGPDspoint *pt, const float diff_mat[4][4], bGPDspoint *r_pt)
#define GP_EDITABLE_STROKES_END(gpstroke_iter)
#define GP_EVALUATED_STROKES_END(gpstroke_iter)
void gpencil_point_to_xy(const GP_SpaceConversion *gsc, const struct bGPDstroke *gps, const struct bGPDspoint *pt, int *r_x, int *r_y)
static int gpencil_select_more_exec(bContext *C, wmOperator *UNUSED(op))
void GPENCIL_OT_select_more(wmOperatorType *ot)
void GPENCIL_OT_select_alternate(wmOperatorType *ot)
static bool gpencil_select_all_poll(bContext *C)
void GPENCIL_OT_select_grouped(wmOperatorType *ot)
struct GP_SelectUserData GP_SelectUserData
void GPENCIL_OT_select_circle(wmOperatorType *ot)
static int gpencil_generic_select_exec(bContext *C, wmOperator *op, GPencilTestFn is_inside_fn, rcti box, GP_SelectUserData *user_data)
void GPENCIL_OT_select_all(wmOperatorType *ot)
static bool gpencil_generic_stroke_select(bContext *C, Object *ob, bGPdata *gpd, GPencilTestFn is_inside_fn, rcti box, GP_SelectUserData *user_data, const bool strokemode, const bool segmentmode, const eSelectOp sel_op, const float scale, const bool is_curve_edit)
static int gpencil_select_random_exec(bContext *C, wmOperator *op)
static int gpencil_select_last_exec(bContext *C, wmOperator *op)
static bool gpencil_do_curve_circle_sel(bContext *C, bGPDstroke *gps, bGPDcurve *gpc, const int mx, const int my, const int radius, const bool select, rcti *rect, const float diff_mat[4][4], const int selectmode)
static bool gpencil_select_same_layer(bContext *C)
static int gpencil_select_all_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_select(wmOperatorType *ot)
static bool gpencil_test_lasso(ARegion *region, const float diff_mat[4][4], const float pt[3], GP_SelectUserData *user_data)
static int gpencil_lasso_select_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_select_vertex_color(wmOperatorType *ot)
bool(* GPencilTestFn)(ARegion *region, const float diff_mat[4][4], const float pt[3], GP_SelectUserData *user_data)
static void select_all_stroke_points(bGPdata *gpd, bGPDstroke *gps, bool select)
static bool gpencil_select_same_material(bContext *C)
static void gpencil_select_curve_point(bContext *C, const int mval[2], const int radius_squared, bGPDlayer **r_gpl, bGPDstroke **r_gps, bGPDcurve **r_gpc, bGPDcurve_point **r_pt, char *handle)
static bool gpencil_stroke_do_circle_sel(bGPdata *gpd, bGPDlayer *gpl, bGPDstroke *gps, GP_SpaceConversion *gsc, const int mx, const int my, const int radius, const bool select, rcti *rect, const float diff_mat[4][4], const int selectmode, const float scale, const bool is_curve_edit)
static void select_all_curve_points(bGPdata *gpd, bGPDstroke *gps, bGPDcurve *gpc, bool deselect)
void GPENCIL_OT_select_box(wmOperatorType *ot)
static int gpencil_select_first_exec(bContext *C, wmOperator *op)
static int gpencil_select_mode_from_sculpt(eGP_Sculpt_SelectMaskFlag mode)
static int gpencil_select_vertex_color_exec(bContext *C, wmOperator *op)
static void gpencil_selected_hue_table(bContext *C, Object *ob, const int threshold, GHash *hue_table)
static int gpencil_select_grouped_exec(bContext *C, wmOperator *op)
static int gpencil_circle_select_exec(bContext *C, wmOperator *op)
static bool gpencil_select_vertex_color_poll(bContext *C)
static int gpencil_select_less_exec(bContext *C, wmOperator *UNUSED(op))
static int gpencil_box_select_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_select_random(wmOperatorType *ot)
void GPENCIL_OT_select_less(wmOperatorType *ot)
static void deselect_all_selected(bContext *C)
static bool gpencil_select_poll(bContext *C)
static int gpencil_select_mode_from_vertex(eGP_Sculpt_SelectMaskFlag mode)
static int gpencil_select_alternate_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_select_first(wmOperatorType *ot)
static bool gpencil_3d_point_to_screen_space(ARegion *region, const float diff_mat[4][4], const float co[3], int r_co[2])
static bool gpencil_generic_curve_select(bContext *C, Object *ob, GPencilTestFn is_inside_fn, rcti UNUSED(box), GP_SelectUserData *user_data, const bool strokemode, const eSelectOp sel_op)
void GPENCIL_OT_select_last(wmOperatorType *ot)
static int gpencil_select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool gpencil_test_box(ARegion *region, const float diff_mat[4][4], const float pt[3], GP_SelectUserData *user_data)
static int gpencil_select_linked_exec(bContext *C, wmOperator *op)
static int gpencil_select_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_select_lasso(wmOperatorType *ot)
void GPENCIL_OT_select_linked(wmOperatorType *ot)
void ED_gpencil_select_toggle_all(bContext *C, int action)
bool ED_gpencil_stroke_material_editable(Object *ob, const bGPDlayer *gpl, const bGPDstroke *gps)
void ED_gpencil_select_curve_toggle_all(bContext *C, int action)
int ED_gpencil_select_stroke_segment(bGPdata *gpd, bGPDlayer *gpl, bGPDstroke *gps, bGPDspoint *pt, bool select, bool insert, const float scale, float r_hita[3], float r_hitb[3])
bool ED_gpencil_stroke_point_is_inside(const bGPDstroke *gps, const GP_SpaceConversion *gsc, const int mval[2], const float diff_mat[4][4])
bool ED_gpencil_stroke_can_use(const bContext *C, const bGPDstroke *gps)
bGPdata * ED_gpencil_data_get_active(const bContext *C)
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
ccl_device_inline float3 pow(float3 v, float e)
static void area(int d1, int d2, int e1, int e2, float weights[2])
static const EnumPropertyItem prop_select_grouped_types[]
void RNA_int_set_array(PointerRNA *ptr, const char *name, const int *values)
void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
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)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const int(* lasso_coords)[2]
bGPDcurve_point * curve_points
struct bGPDspoint * pt_orig
bGPDspoint_Runtime runtime
struct bGPDstroke * gps_orig
bGPDstroke_Runtime runtime
struct bGPDcurve * editcurve
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
const char *(* get_name)(struct wmOperatorType *, struct PointerRNA *)
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool WM_gesture_is_modal_first(const wmGesture *gesture)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_circle_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_gesture_circle_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_gesture_lasso_cancel(bContext *C, wmOperator *op)
int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event)
const int(* WM_gesture_lasso_path_to_array(bContext *UNUSED(C), wmOperator *op, int *r_mcoords_len))[2]
void WM_operator_properties_border_to_rcti(struct wmOperator *op, rcti *rect)
int WM_operator_properties_select_random_seed_increment_get(wmOperator *op)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
void WM_operator_properties_select_operation(wmOperatorType *ot)
void WM_operator_properties_gesture_lasso(wmOperatorType *ot)
void WM_operator_properties_select_random(wmOperatorType *ot)
void WM_operator_properties_gesture_circle(wmOperatorType *ot)
void WM_operator_properties_select_all(wmOperatorType *ot)
void WM_operator_properties_mouse_select(wmOperatorType *ot)
int WM_operator_flag_only_pass_through_on_press(int retval, const struct wmEvent *event)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))