172 bool is_object =
false;
238 if (
G.background ==
false) {
250 ot->
name =
"Strokes Edit Mode Toggle";
251 ot->
idname =
"GPENCIL_OT_editmode_toggle";
252 ot->
description =
"Enter/Exit edit mode for Grease Pencil strokes";
263 ot->
srna,
"back", 0,
"Return to Previous Mode",
"Return to previous mode");
291 bool changed =
false;
308 for (
int i = 0; i < gps->totpoints; i++) {
309 pt = &gps->points[i];
332 ot->
name =
"Select Mode Toggle";
333 ot->
idname =
"GPENCIL_OT_selectmode_toggle";
334 ot->
description =
"Set selection mode for Grease Pencil strokes";
344 prop =
RNA_def_int(
ot->
srna,
"mode", 0, 0, 2,
"Select Mode",
"Select mode", 0, 2);
373 bool is_object =
false;
435 if (
G.background ==
false) {
447 ot->
name =
"Strokes Paint Mode Toggle";
448 ot->
idname =
"GPENCIL_OT_paintmode_toggle";
449 ot->
description =
"Enter/Exit paint mode for Grease Pencil strokes";
460 ot->
srna,
"back", 0,
"Return to Previous Mode",
"Return to previous mode");
489 bool is_object =
false;
542 if (
G.background ==
false) {
560 ot->
name =
"Strokes Sculpt Mode Toggle";
561 ot->
idname =
"GPENCIL_OT_sculptmode_toggle";
562 ot->
description =
"Enter/Exit sculpt mode for Grease Pencil strokes";
573 ot->
srna,
"back", 0,
"Return to Previous Mode",
"Return to previous mode");
598 bool is_object =
false;
607 const bool is_mode_set = (ob->
mode & mode_flag) != 0;
656 if (
G.background ==
false) {
668 ot->
name =
"Strokes Weight Mode Toggle";
669 ot->
idname =
"GPENCIL_OT_weightmode_toggle";
670 ot->
description =
"Enter/Exit weight paint mode for Grease Pencil strokes";
681 ot->
srna,
"back", 0,
"Return to Previous Mode",
"Return to previous mode");
709 bool is_object =
false;
765 if (
G.background ==
false) {
777 ot->
name =
"Strokes Vertex Mode Toggle";
778 ot->
idname =
"GPENCIL_OT_vertexmode_toggle";
779 ot->
description =
"Enter/Exit vertex paint mode for Grease Pencil strokes";
790 ot->
srna,
"back", 0,
"Return to Previous Mode",
"Return to previous mode");
825 ot->
name =
"Hide Selected";
826 ot->
idname =
"GPENCIL_OT_selection_opacity_toggle";
827 ot->
description =
"Hide/Unhide selected points for Grease Pencil strokes setting alpha factor";
847 const char *layername)
858 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
860 if (start_idx == -1) {
877 len = i - start_idx + 1;
901 for (
int j = 0; j < gpsd->
totpoints; j++) {
938 bool changed =
false;
991 for (i = 0, pt = gps->
points; i < gps->totpoints; i++, pt++) {
1020 ot->
name =
"Duplicate Strokes";
1021 ot->
idname =
"GPENCIL_OT_duplicate";
1022 ot->
description =
"Duplicate the selected Grease Pencil strokes";
1068 dvert_final->
dw = dvert->
dw;
1082 const bool do_stroke = (do_first || do_last);
1085 for (
int i = 0; i < gps->
totpoints; i++) {
1122 int totnewpoints, oldtotpoints;
1124 if ((do_first) || (do_last)) {
1153 for (
int i = 0; i < oldtotpoints; i++) {
1172 gps, temp_points, temp_dverts, oldtotpoints - 1, gps->
totpoints - 1,
true);
1248 last_select =
false;
1251 if (first_select || last_select) {
1252 int new_num_points = old_num_points;
1303 bool changed =
false;
1305 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
1308 if ((gpf == gpl->actframe) || ((gpf->flag &
GP_FRAME_SELECT) && (is_multiedit))) {
1313 for (gps = gpf->strokes.first; gps; gps = gps->
next) {
1319 if (is_curve_edit) {
1337 if (!is_multiedit) {
1359 ot->
name =
"Extrude Stroke Points";
1361 ot->
description =
"Extrude the selected Grease Pencil points";
1523 if (is_curve_edit) {
1613 ot->
name =
"Copy Strokes";
1615 ot->
description =
"Copy selected Grease Pencil points and strokes";
1674 "No strokes to paste, select and copy some points before trying again");
1684 op->
reports,
RPT_ERROR,
"Can not paste strokes when active layer is hidden or locked");
1709 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
1721 if (is_curve_edit) {
1792 ot->
name =
"Paste Strokes";
1794 ot->
description =
"Paste previously copied strokes to active layer or to original layer";
1807 ot->
srna,
"paste_back", 0,
"Paste on Back",
"Add pasted strokes behind all strokes");
1838 if (layer_num > -1) {
1846 if (target_layer ==
NULL) {
1863 if ((gpl == target_layer) || (gpf ==
NULL)) {
1888 if ((layer_num == -1) && (use_autolock)) {
1895 if (strokes.
first) {
1917 ot->
name =
"Move Strokes to Layer";
1918 ot->
idname =
"GPENCIL_OT_move_to_layer";
1920 "Move selected strokes to another layer";
1931 ot->
srna,
"layer", 0, -1, INT_MAX,
"Grease Pencil Layer",
"", -1, INT_MAX);
1962 if ((all_layers ==
false) && (gpl != active_gpl)) {
1970 for (; gpf; gpf = gpf->
next) {
1992 ot->
name =
"Insert Blank Frame";
1993 ot->
idname =
"GPENCIL_OT_blank_frame_add";
1995 "Insert a blank frame on the current frame "
1996 "(all subsequently existing frames, if any, are shifted right by one frame)";
2009 "Create blank frame in all layers, not only active");
2040 const bool is_annotation =
STREQ(op->
idname,
"GPENCIL_OT_annotation_active_frame_delete");
2074 ot->
name =
"Delete Active Frame";
2075 ot->
idname =
"GPENCIL_OT_active_frame_delete";
2076 ot->
description =
"Delete the active frame for the active Grease Pencil Layer";
2088 ot->
name =
"Delete Active Frame";
2089 ot->
idname =
"GPENCIL_OT_annotation_active_frame_delete";
2090 ot->
description =
"Delete the active frame for the active Annotation Layer";
2120 bool success =
false;
2151 ot->
name =
"Delete All Active Frames";
2152 ot->
idname =
"GPENCIL_OT_active_frames_delete_all";
2153 ot->
description =
"Delete the active frame(s) of all editable Grease Pencil layers";
2192 bool changed =
false;
2194 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
2197 if ((gpf == gpl->actframe) || ((gpf->flag &
GP_FRAME_SELECT) && (is_multiedit))) {
2239 bool changed =
false;
2243 int first = 0, last = 0;
2244 int num_points_remaining = gpc->tot_curve_points;
2248 for (
int i = 0; i < gpc->tot_curve_points; i++) {
2251 num_points_remaining--;
2257 for (
int i = 0; i < gpc->tot_curve_points; i++) {
2267 for (
int i = first + 1; i < last; i++) {
2270 num_points_remaining--;
2275 for (
int i = 0; i < gpc->tot_curve_points; i++) {
2278 num_points_remaining--;
2287 if (num_points_remaining < 1) {
2299 for (
int i = 0; i < gpc->tot_curve_points; i++) {
2309 for (
int i = 0; i < first; i++) {
2317 for (
int i = first; i < last; i++) {
2326 for (
int i = last; i < gpc->tot_curve_points; i++) {
2335 for (
int i = 0; i < gpc->tot_curve_points; i++) {
2349 if (gpc->curve_points !=
NULL) {
2353 gpc->curve_points = new_points;
2354 gpc->tot_curve_points = num_points_remaining;
2373 bool changed =
false;
2384 int tot = gps->totpoints;
2390 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2401 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2410 for (i = first, pt = gps->points + first; i < last; i++, pt++) {
2418 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2438 "new gp stroke points copy");
2444 if (gps->dvert !=
NULL) {
2451 (gps->dvert !=
NULL) ? dvert = gps->dvert :
NULL;
2452 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2457 if (gps->dvert !=
NULL) {
2463 if (gps->dvert !=
NULL) {
2470 (gps->dvert !=
NULL) ? dvert = gps->dvert :
NULL;
2471 for (i = 0, pt = gps->points; i < first; i++, pt++) {
2475 if (gps->dvert !=
NULL) {
2483 (gps->dvert !=
NULL) ? dvert = gps->dvert + first :
NULL;
2484 for (i = first, pt = gps->points + first; i < last; i++, pt++) {
2489 if (gps->dvert !=
NULL) {
2495 if (gps->dvert !=
NULL) {
2500 (gps->dvert !=
NULL) ? dvert = gps->dvert + last :
NULL;
2501 for (i = last, pt = gps->points + last; i < gps->totpoints; i++, pt++) {
2505 if (gps->dvert !=
NULL) {
2516 (gps->dvert !=
NULL) ? dvert = gps->dvert :
NULL;
2517 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2522 if (gps->dvert !=
NULL) {
2528 if (gps->dvert !=
NULL) {
2545 gps->points = new_points;
2546 gps->dvert = new_dvert;
2547 gps->totpoints = tot;
2555 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2574 bool changed =
false;
2576 if (is_curve_edit) {
2600 bool changed =
false;
2603 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
2606 if ((gpf == gpl->actframe) || ((gpf->flag &
GP_FRAME_SELECT) && (is_multiedit))) {
2629 if (is_curve_edit) {
2697 "Delete selected points and split strokes into segments"},
2706 ot->
description =
"Delete selected Grease Pencil strokes, vertices, or frames";
2719 prop_gpencil_delete_types,
2722 "Method used for deleting Grease Pencil data");
2746 "Dissolve points between selected points"},
2753 ot->
idname =
"GPENCIL_OT_dissolve";
2754 ot->
description =
"Delete selected points without splitting strokes";
2767 prop_gpencil_dissolve_types,
2770 "Method used for dissolving stroke points");
2803 bool changed =
false;
2808 float diff_mat[4][4];
2823 if (is_curve_edit) {
2824 if (gps->editcurve ==
NULL) {
2827 float inv_diff_mat[4][4];
2835 float tmp0[3], tmp1[3], tmp2[3], offset[3];
2841 offset[0] = gridf *
floorf(0.5f + tmp1[0] / gridf) - tmp1[0];
2842 offset[1] = gridf *
floorf(0.5f + tmp1[1] / gridf) - tmp1[1];
2843 offset[2] = gridf *
floorf(0.5f + tmp1[2] / gridf) - tmp1[2];
2869 for (
int i = 0; i < gps->totpoints; i++) {
2877 fpt[0] = gridf *
floorf(0.5f + fpt[0] / gridf);
2878 fpt[1] = gridf *
floorf(0.5f + fpt[1] / gridf);
2879 fpt[2] = gridf *
floorf(0.5f + fpt[2] / gridf);
2905 ot->
name =
"Snap Selection to Grid";
2906 ot->
idname =
"GPENCIL_OT_snap_to_grid";
2907 ot->
description =
"Snap selected points to the nearest grid points";
2934 bool changed =
false;
2935 if (is_curve_edit) {
2943 float diff_mat[4][4];
2970 sub_v3_v3v3(offset, cursor_global, &gps->points->x);
2973 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
2981 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
3007 ot->
name =
"Snap Selection to Cursor";
3008 ot->
idname =
"GPENCIL_OT_snap_to_cursor";
3009 ot->
description =
"Snap selected points/strokes to the cursor";
3023 "Offset the entire stroke instead of selected points only");
3036 float r_centroid[3],
3041 bool changed =
false;
3047 float diff_mat[4][4];
3069 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
3100 float centroid[3] = {0.0f};
3106 bool changed =
false;
3107 if (is_curve_edit) {
3136 ot->
name =
"Snap Cursor to Selected Points";
3137 ot->
idname =
"GPENCIL_OT_snap_cursor_to_selected";
3138 ot->
description =
"Snap cursor to center of selected points";
3168 if ((gps->thickness == 0) && (gpl->
line_change == 0)) {
3172 gps->thickness = gps->thickness + gpl->
line_change;
3191 ot->
name =
"Apply Stroke Thickness";
3192 ot->
idname =
"GPENCIL_OT_stroke_apply_thickness";
3193 ot->
description =
"Apply the thickness change of the layer to its strokes";
3228 bool changed =
false;
3231 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
3234 if ((gpf == gpl->actframe) || ((gpf->flag &
GP_FRAME_SELECT) && (is_multiedit))) {
3239 for (gps = gpf->strokes.first; gps; gps = gps->
next) {
3273 if (is_curve_edit) {
3288 if (!is_multiedit) {
3313 if (!
STREQ(prop_id,
"type")) {
3337 ot->
name =
"Set Cyclical State";
3338 ot->
idname =
"GPENCIL_OT_stroke_cyclical_set";
3339 ot->
description =
"Close or open the selected stroke adding an edge from last to first point";
3352 ot->
srna,
"geometry",
false,
"Create Geometry",
"Create new geometry for closing stroke");
3380 bool changed =
false;
3383 if (gpl->actframe ==
NULL) {
3387 for (
bGPDstroke *gps = gpl->actframe->strokes.last; gps; gps = gps->
prev) {
3400 short prev_first = gps->caps[0];
3401 short prev_last = gps->caps[1];
3420 if (prev_first != gps->caps[0] || prev_last != gps->caps[1]) {
3450 ot->
name =
"Set Caps Mode";
3451 ot->
idname =
"GPENCIL_OT_stroke_caps_set";
3452 ot->
description =
"Change stroke caps mode (rounded or flat)";
3479 const int totstrokes)
3482 float min_dist = FLT_MAX;
3483 float dist, start_a[3], end_a[3], start_b[3], end_b[3];
3491 for (
int i = 0; i < totstrokes; i++) {
3503 if (dist < min_dist) {
3508 if (dist < min_dist) {
3513 if (dist < min_dist) {
3518 if (dist < min_dist) {
3535 const int max_join_strokes = 128;
3546 if (is_curve_edit) {
3556 int tot_strokes = 0;
3578 elem = &strokes_list[tot_strokes];
3585 if (tot_strokes == max_join_strokes) {
3588 "Too many strokes selected, only joined first %d strokes",
3598 if (tot_strokes < 2) {
3604 elem = &strokes_list[0];
3618 elem = &strokes_list[i];
3629 for (
int i = 0; i < tot_strokes; i++) {
3630 elem = &strokes_list[i];
3655 ot->
name =
"Join Strokes";
3656 ot->
idname =
"GPENCIL_OT_stroke_join";
3657 ot->
description =
"Join selected strokes (optionally as new stroke)";
3672 "Leave gaps between joined strokes instead of linking them");
3692 bool changed =
false;
3711 if (is_curve_edit) {
3737 ot->
name =
"Flip Stroke";
3738 ot->
idname =
"GPENCIL_OT_stroke_flip";
3739 ot->
description =
"Change direction of the points of the selected strokes";
3770 bool changed =
false;
3774 int cfra_prv = INT_MIN;
3778 bool curve_select =
false;
3779 if (is_curve_edit && gps->editcurve !=
NULL) {
3787 cfra_prv = gpf_->framenum;
3788 CFRA = gpf_->framenum;
3794 if (is_curve_edit && gps->editcurve !=
NULL) {
3828 {
GP_REPROJECT_FRONT,
"FRONT", 0,
"Front",
"Reproject the strokes using the X-Z plane"},
3829 {
GP_REPROJECT_SIDE,
"SIDE", 0,
"Side",
"Reproject the strokes using the Y-Z plane"},
3830 {
GP_REPROJECT_TOP,
"TOP", 0,
"Top",
"Reproject the strokes using the X-Y plane"},
3835 "Reproject the strokes to end up on the same plane, as if drawn from the current viewpoint "
3836 "using 'Cursor' Stroke Placement"},
3841 "Reproject the strokes on to the scene geometry, as if drawn using 'Surface' placement"},
3846 "Reproject the strokes using the orientation of 3D cursor"},
3851 ot->
name =
"Reproject Strokes";
3852 ot->
idname =
"GPENCIL_OT_reproject";
3854 "Reproject the selected strokes from the current viewpoint as if they had been newly drawn "
3855 "(e.g. to fix problems from accidental 3D cursor movement or accidental viewport changes, "
3856 "or for matching deforming geometry)";
3875 "Keep original strokes and create a copy before reprojecting instead of reproject them");
3903 ot->
name =
"Recalculate internal geometry";
3904 ot->
idname =
"GPENCIL_OT_recalc_geometry";
3932 if (factor == 0.0f) {
3938 for (
int r = 0;
r < repeat;
r++) {
3939 for (
int i = 0; i < gps->totpoints; i++) {
3946 if (smooth_position) {
3949 if (smooth_strength) {
3952 if (smooth_thickness) {
3954 for (
int r2 = 0; r2 < 20; r2++) {
3973 int totnewpoints = 0;
3974 for (i = 0, pt = gps->
points; i < gps->totpoints && pt; i++, pt++) {
3989 return totnewpoints;
3995 int totnewpoints, oldtotpoints;
3998 for (
int s = 0; s < cuts; s++) {
4000 if (totnewpoints == 0) {
4024 for (
int i = 0; i < oldtotpoints; i++) {
4037 dvert = &temp_dverts[i];
4038 dvert_final = &gps->
dvert[i2];
4040 dvert_final->
dw = dvert->
dw;
4046 if (i + 1 < oldtotpoints) {
4048 pt_final = &gps->
points[i2];
4050 dvert_final = &gps->
dvert[i2];
4064 dvert = &temp_dverts[i];
4065 dvert_next = &temp_dverts[i + 1];
4066 dvert_final = &gps->
dvert[i2];
4072 for (
int d = 0; d < dvert->
totweight; d++) {
4090 bGPDspoint *pt = &temp_points[oldtotpoints - 1];
4095 dvert_final = &gps->
dvert[i2];
4108 dvert = &temp_dverts[oldtotpoints - 1];
4109 dvert_next = &temp_dverts[0];
4110 dvert_final = &gps->
dvert[i2];
4116 for (
int d = 0; d < dvert->
totweight; d++) {
4146 bool changed =
false;
4147 if (is_curve_edit) {
4195 if (!
STREQ(prop_id,
"number_cuts")) {
4208 ot->
name =
"Subdivide Stroke";
4209 ot->
idname =
"GPENCIL_OT_stroke_subdivide";
4211 "Subdivide between continuous selected points of the stroke adding a point half way between "
4223 prop =
RNA_def_int(
ot->
srna,
"number_cuts", 1, 1, 10,
"Number of Cuts",
"", 1, 5);
4235 "Smooth only selected points in the stroke");
4255 bool changed =
false;
4256 if (is_curve_edit) {
4285 ot->
name =
"Simplify Stroke";
4286 ot->
idname =
"GPENCIL_OT_stroke_simplify";
4287 ot->
description =
"Simplify selected stroked reducing number of points";
4315 bool changed =
false;
4316 if (is_curve_edit) {
4324 for (
int i = 0; i <
steps; i++) {
4346 ot->
name =
"Simplify Fixed Stroke";
4347 ot->
idname =
"GPENCIL_OT_stroke_simplify_fixed";
4348 ot->
description =
"Simplify selected stroked reducing number of points using fixed algorithm";
4358 prop =
RNA_def_int(
ot->
srna,
"step", 1, 1, 100,
"Steps",
"Number of simplify steps", 1, 10);
4395 ot->
name =
"Sample Stroke";
4396 ot->
idname =
"GPENCIL_OT_stroke_sample";
4397 ot->
description =
"Sample stroke points to predefined segment length";
4432 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
4435 if ((gpf == gpl->actframe) || ((gpf->flag &
GP_FRAME_SELECT) && (is_multiedit))) {
4449 if (is_curve_edit) {
4458 if (!is_multiedit) {
4476 ot->
name =
"Trim Stroke";
4477 ot->
idname =
"GPENCIL_OT_stroke_trim";
4478 ot->
description =
"Trim selected stroke to first loop or intersection";
4538 bool has_selected =
false;
4541 has_selected =
true;
4547 if (!has_selected) {
4558 ob_dst = base_new->
object;
4571 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
4574 if ((gpf == gpl->actframe) || ((gpf->flag &
GP_FRAME_SELECT) && (is_multiedit))) {
4595 if (gpl_dst ==
NULL) {
4600 if (gpf_dst ==
NULL) {
4613 if (is_curve_edit) {
4627 for (i = 0, pt = gps_dst->
points; i < gps_dst->totpoints; i++, pt++) {
4647 gps->prev = gps->next =
NULL;
4658 if (!is_multiedit) {
4672 else if (gpl->
next) {
4703 int actcol = ob_dst->
actcol;
4704 for (
int slot = 1; slot <= ob_dst->
totcol; slot++) {
4708 if (actcol >= slot) {
4730 {
GP_SEPARATE_POINT,
"POINT", 0,
"Selected Points",
"Separate the selected points"},
4731 {
GP_SEPARATE_STROKE,
"STROKE", 0,
"Selected Strokes",
"Separate the selected strokes"},
4732 {
GP_SEPARATE_LAYER,
"LAYER", 0,
"Active Layer",
"Separate the strokes of the current layer"},
4737 ot->
name =
"Separate Strokes";
4738 ot->
idname =
"GPENCIL_OT_stroke_separate";
4739 ot->
description =
"Separate the selected strokes or layer in a new grease pencil object";
4775 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
4778 if ((gpf == gpl->actframe) || ((gpf->flag &
GP_FRAME_SELECT) && (is_multiedit))) {
4796 if (is_curve_edit) {
4807 for (i = 0, pt = gps_dst->
points; i < gps_dst->totpoints; i++, pt++) {
4824 for (
int i2 = 0; i2 < gps->totpoints; i2++, ptn++) {
4834 if (!is_multiedit) {
4851 ot->
name =
"Split Strokes";
4852 ot->
idname =
"GPENCIL_OT_stroke_split";
4853 ot->
description =
"Split selected points as new stroke on same frame";
4892 ot->
name =
"Smooth Stroke";
4893 ot->
idname =
"GPENCIL_OT_stroke_smooth";
4912 "Smooth only selected points in the stroke");
4935 const float diff_mat[4][4],
4951 const float diff_mat[4][4],
4957 const bool flat_caps)
4966 for (i = 0, pt = hit_stroke->
points; i < hit_stroke->totpoints; i++, pt++) {
4973 if (((totselect == 1) && (hit_stroke->
totpoints == 2)) || (hit_stroke->
totpoints == totselect)) {
4980 if ((hit_stroke) && (hit_stroke->
totpoints == 2)) {
4981 pt = &hit_stroke->
points[0];
4982 pt1 = &hit_stroke->
points[1];
4992 for (i = 0, pt = hit_stroke->
points; i < hit_stroke->totpoints; i++, pt++) {
5034 bool changed =
false;
5047 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
5052 for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
5061 if (!is_multiedit) {
5073 float diff_mat[4][4];
5076 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
5078 if ((gpf == gpl->actframe) || ((gpf->flag &
GP_FRAME_SELECT) && (is_multiedit))) {
5091 const int oldtot = gps->totpoints;
5092 for (
int i = 0; i < gps->totpoints; i++) {
5093 pt = &gps->points[i];
5105 float r_hita[3], r_hitb[3];
5106 if (gps->totpoints > 1) {
5108 gpd, gpl, gps, pt,
true,
true, scale, r_hita, r_hitb);
5111 if (gps->totpoints > oldtot) {
5117 if ((tot_inside == oldtot) || ((tot_inside == 1) && (oldtot == 2))) {
5118 for (
int i = 0; i < gps->totpoints; i++) {
5119 pt = &gps->points[i];
5125 if (!is_multiedit) {
5134 bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
5137 gpl->actframe = gpf;
5144 if (!is_multiedit) {
5148 gpl->actframe = gpf_act;
5204 ot->
name =
"Stroke Cutter";
5206 ot->
idname =
"GPENCIL_OT_stroke_cutter";
5280 if (is_curve_edit) {
5305 ot->
name =
"Merge by Distance";
5306 ot->
idname =
"GPENCIL_OT_stroke_merge_by_distance";
5317 prop =
RNA_def_float(
ot->
srna,
"threshold", 0.001f, 0.0f, 100.0f,
"Threshold",
"", 0.0f, 100.0f);
5322 ot->
srna,
"use_unselected", 0,
"Unselected",
"Use whole stroke, not only selected points");
void BKE_brush_gpencil_paint_presets(struct Main *bmain, struct ToolSettings *ts, const bool reset)
void BKE_brush_gpencil_sculpt_presets(struct Main *bmain, struct ToolSettings *ts, const bool reset)
void BKE_brush_gpencil_weight_presets(struct Main *bmain, struct ToolSettings *ts, const bool reset)
void BKE_brush_gpencil_vertex_presets(struct Main *bmain, struct ToolSettings *ts, const bool reset)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct Base * CTX_data_active_base(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct bGPDlayer * CTX_data_active_gpencil_layer(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
#define CTX_DATA_COUNT(C, member)
struct wmMsgBus * CTX_wm_message_bus(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
void BKE_gpencil_stroke_select_index_set(struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_layer_active_set(struct bGPdata *gpd, struct bGPDlayer *active)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
void BKE_gpencil_free_stroke_weights(struct bGPDstroke *gps)
int BKE_gpencil_object_material_ensure(struct Main *bmain, struct Object *ob, struct Material *material)
void BKE_gpencil_palette_ensure(struct Main *bmain, struct Scene *scene)
void BKE_gpencil_stroke_select_index_reset(struct bGPDstroke *gps)
struct bGPDcurve * BKE_gpencil_stroke_editcurve_new(const int tot_curve_points)
bool BKE_gpencil_layer_is_editable(const struct bGPDlayer *gpl)
bool BKE_gpencil_layer_frame_delete(struct bGPDlayer *gpl, struct bGPDframe *gpf)
int BKE_gpencil_object_material_index_get(struct Object *ob, struct Material *ma)
struct bGPDframe * BKE_gpencil_layer_frame_find(struct bGPDlayer *gpl, int cframe)
void BKE_gpencil_free_stroke(struct bGPDstroke *gps)
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[])
void BKE_gpencil_layer_transform_matrix_get(const struct Depsgraph *depsgraph, struct Object *obact, struct bGPDlayer *gpl, float diff_mat[4][4])
struct bGPDstroke * BKE_gpencil_stroke_duplicate(struct bGPDstroke *gps_src, const bool dup_points, const bool dup_curve)
struct bGPDlayer * BKE_gpencil_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive)
void BKE_gpencil_stroke_weights_duplicate(struct bGPDstroke *gps_src, struct bGPDstroke *gps_dst)
void BKE_gpencil_stroke_editcurve_update(struct bGPdata *gpd, struct bGPDlayer *gpl, struct bGPDstroke *gps)
void BKE_gpencil_editcurve_stroke_sync_selection(struct bGPdata *gpd, struct bGPDstroke *gps, struct bGPDcurve *gpc)
void BKE_gpencil_editcurve_recalculate_handles(struct bGPDstroke *gps)
void BKE_gpencil_editcurve_subdivide(struct bGPDstroke *gps, const int cuts)
void BKE_gpencil_stroke_flip(struct bGPDstroke *gps)
bool BKE_gpencil_stroke_smooth_strength(struct bGPDstroke *gps, int point_index, float influence)
void BKE_gpencil_stroke_merge_distance(struct bGPdata *gpd, struct bGPDframe *gpf, struct bGPDstroke *gps, const float threshold, const bool use_unselected)
bool BKE_gpencil_stroke_smooth_thickness(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)
bool BKE_gpencil_stroke_smooth_uv(struct bGPDstroke *gps, int point_index, float influence)
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_sample(struct bGPdata *gpd, struct bGPDstroke *gps, const float dist, const bool select)
bool BKE_gpencil_stroke_smooth(struct bGPDstroke *gps, int i, float inf)
void BKE_gpencil_stroke_simplify_fixed(struct bGPdata *gpd, struct bGPDstroke *gps)
void BKE_gpencil_stroke_join(struct bGPDstroke *gps_a, struct bGPDstroke *gps_b, const bool leave_gaps, const bool fit_thickness)
void BKE_gpencil_curve_delete_tagged_points(struct bGPdata *gpd, struct bGPDframe *gpf, struct bGPDstroke *gps, struct bGPDstroke *next_stroke, struct bGPDcurve *gpc, int tag_flags)
bool BKE_gpencil_stroke_close(struct bGPDstroke *gps)
bool BKE_gpencil_stroke_trim(struct bGPdata *gpd, struct bGPDstroke *gps)
void id_us_min(struct ID *id)
char * BKE_id_to_unique_string_key(const struct ID *id)
General operations, lookup, etc. for materials.
struct MaterialGPencilStyle * BKE_gpencil_material_settings(struct Object *ob, short act)
bool BKE_object_material_slot_remove(struct Main *bmain, struct Object *ob)
bool BKE_object_material_slot_used(struct ID *id, short actcol)
struct Material * BKE_object_material_get(struct Object *ob, short act)
struct Material * BKE_gpencil_material(struct Object *ob, short act)
General operations, lookup, etc. for blender objects.
bool BKE_paint_ensure(struct ToolSettings *ts, struct Paint **r_paint)
void BKE_paint_toolslots_brush_validate(struct Main *bmain, struct Paint *paint)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_scene_graph_update_for_newframe(struct Depsgraph *depsgraph)
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_str_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
#define GHASH_ITER(gh_iter_, ghash_)
bool BLI_ghash_haskey(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
GHash * BLI_ghash_int_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
void * BLI_ghash_lookup(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
void BLI_lasso_boundbox(struct rcti *rect, const int mcoords[][2], const unsigned int mcoords_len)
bool BLI_lasso_is_point_inside(const int mcoords[][2], const unsigned int mcoords_len, const int sx, const int sy, const int error_value)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
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_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void void BLI_INLINE bool BLI_listbase_is_single(const struct ListBase *lb)
void * BLI_findstring(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float interpf(float a, float b, float t)
void invert_m4_m4_safe(float Ainv[4][4], const float A[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void minmax_v3v3_v3(float min[3], float max[3], const float vec[3])
MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t)
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
bool BLI_rcti_isect_pt(const struct rcti *rect, const int x, const int y)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
#define INIT_MINMAX(min, max)
#define POINTER_FROM_INT(i)
struct Depsgraph Depsgraph
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
float DEG_get_ctime(const Depsgraph *graph)
@ ID_RECALC_COPY_ON_WRITE
#define BEZT_DESEL_ALL(bezt)
#define BEZT_SEL_IDX(bezt, i)
@ GP_CURVE_NEEDS_STROKE_UPDATE
@ GP_STROKE_NEEDS_CURVE_UPDATE
#define GPENCIL_MULTIEDIT_SESSIONS_ON(gpd)
#define GPENCIL_PAINT_MODE(gpd)
@ GP_DATA_STROKE_WEIGHTMODE
@ GP_DATA_STROKE_VERTEXMODE
@ GP_DATA_STROKE_PAINTMODE
@ GP_DATA_STROKE_SCULPTMODE
@ GP_DATA_AUTOLOCK_LAYERS
@ GP_DATA_STROKE_EDITMODE
#define GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)
Object is a sort of wrapper for general info.
@ V3D_AROUND_CENTER_BOUNDS
struct Base * ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct Base *base, const eDupli_ID_Flags dupflag)
void ED_object_posemode_set_for_weight_paint(struct bContext *C, struct Main *bmain, struct Object *ob, const bool is_mode_set)
void ED_outliner_select_sync_from_object_tag(struct bContext *C)
bool ED_operator_view3d_active(struct bContext *C)
SnapObjectContext * ED_transform_snap_object_context_create_view3d(struct Scene *scene, int flag, const struct ARegion *region, const struct View3D *v3d)
void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx)
float ED_view3d_grid_view_scale(struct Scene *scene, struct View3D *v3d, struct ARegion *region, const char **r_grid_unit)
_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 type
Read Guarded memory(de)allocation.
#define MEM_recallocN(vmemh, len)
Group RGB to Bright Vector Camera CLAMP
#define ND_GPENCIL_EDITMODE
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
const Depsgraph * depsgraph
static bool is_inside(int x, int y, int cols, int rows)
static bool gpencil_sculptmode_toggle_poll(bContext *C)
void ED_gpencil_strokes_copybuf_free(void)
void GPENCIL_OT_recalc_geometry(wmOperatorType *ot)
void GPENCIL_OT_snap_to_cursor(wmOperatorType *ot)
static int gpencil_stroke_separate_exec(bContext *C, wmOperator *op)
static GHash * gpencil_strokes_copypastebuf_colors_material_to_name_create(Main *bmain)
void GPENCIL_OT_stroke_cyclical_set(wmOperatorType *ot)
static int gpencil_delete_selected_strokes(bContext *C)
static int gpencil_stroke_cyclical_set_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_move_to_layer(wmOperatorType *ot)
static bool gpencil_actframe_delete_all_poll(bContext *C)
static int gpencil_strokes_paste_exec(bContext *C, wmOperator *op)
static int gpencil_snap_to_cursor(bContext *C, wmOperator *op)
static void gpencil_cutter_dissolve(bGPdata *gpd, bGPDlayer *hit_layer, bGPDstroke *hit_stroke, const bool flat_caps)
static int gpencil_extrude_exec(bContext *C, wmOperator *op)
struct tJoinStrokes tJoinStrokes
static bool gpencil_vertexmode_toggle_poll(bContext *C)
static int gpencil_stroke_simplify_exec(bContext *C, wmOperator *op)
static bool annotation_actframe_delete_poll(bContext *C)
static bool gpencil_dissolve_selected_curve_points(bContext *C, bGPdata *gpd, eGP_DissolveMode mode)
void GPENCIL_OT_paintmode_toggle(wmOperatorType *ot)
void GPENCIL_OT_stroke_simplify_fixed(wmOperatorType *ot)
void GPENCIL_OT_copy(wmOperatorType *ot)
static GHash * gpencil_strokes_copypastebuf_colors
@ GP_STROKE_CAPS_TOGGLE_START
@ GP_STROKE_CAPS_TOGGLE_END
@ GP_STROKE_CAPS_TOGGLE_BOTH
@ GP_STROKE_CAPS_TOGGLE_DEFAULT
static void gpencil_duplicate_points(bGPdata *gpd, const bGPDstroke *gps, ListBase *new_strokes, const char *layername)
static int gpencil_snap_cursor_to_sel(bContext *C, wmOperator *op)
static bool gpencil_stroke_points_centroid(Depsgraph *depsgraph, bContext *C, Object *obact, bGPdata *gpd, float r_centroid[3], float r_min[3], float r_max[3], size_t *count)
void GPENCIL_OT_snap_to_grid(wmOperatorType *ot)
static int gpencil_selectmode_toggle_exec(bContext *C, wmOperator *op)
static void gpencil_add_move_points(bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps)
void GPENCIL_OT_active_frame_delete(wmOperatorType *ot)
static int gpencil_paintmode_toggle_exec(bContext *C, wmOperator *op)
static bool gpencil_weightmode_toggle_poll(bContext *C)
@ GP_STROKE_CYCLIC_TOGGLE
void GPENCIL_OT_stroke_flip(wmOperatorType *ot)
static bool gpencil_strokes_edit3d_poll(bContext *C)
static int gpencil_editmode_toggle_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_dissolve(wmOperatorType *ot)
static bool gpencil_dissolve_selected_stroke_points(bContext *C, bGPdata *gpd, eGP_DissolveMode mode)
static int gpencil_actframe_delete_all_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_stroke_simplify(wmOperatorType *ot)
static int gpencil_stroke_trim_exec(bContext *C, wmOperator *op)
static void gpencil_strokes_copypastebuf_colors_material_to_name_free(GHash *ma_to_name)
static int gpencil_cutter_lasso_select(bContext *C, wmOperator *op, GPencilTestFn is_inside_fn, void *user_data)
static void gpencil_strokes_copypastebuf_colors_name_to_material_free(GHash *name_to_ma)
static bool gpencil_cyclical_set_curve_edit_poll_property(const bContext *C, wmOperator *UNUSED(op), const PropertyRNA *prop)
static int gpencil_duplicate_exec(bContext *C, wmOperator *op)
static void gpencil_smooth_stroke(bContext *C, wmOperator *op)
static int gpencil_get_nearest_stroke_index(tJoinStrokes *strokes_list, const bGPDstroke *gps, const int totstrokes)
int gpencil_delete_selected_point_wrap(bContext *C)
void GPENCIL_OT_snap_cursor_to_selected(wmOperatorType *ot)
static int gpencil_dissolve_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_weightmode_toggle(wmOperatorType *ot)
bool(* GPencilTestFn)(bGPDstroke *gps, bGPDspoint *pt, const GP_SpaceConversion *gsc, const float diff_mat[4][4], void *user_data)
static bool gpencil_merge_by_distance_poll(bContext *C)
static int gpencil_delete_selected_points(bContext *C)
static GHash * gpencil_strokes_copypastebuf_colors_name_to_material_create(Main *bmain)
static int gpencil_vertexmode_toggle_exec(bContext *C, wmOperator *op)
static bool gpencil_editmode_toggle_poll(bContext *C)
void GPENCIL_OT_stroke_split(wmOperatorType *ot)
static int gpencil_blank_frame_add_exec(bContext *C, wmOperator *op)
static void gpencil_stroke_subdivide(bGPDstroke *gps, const int cuts)
static int gpencil_stroke_join_exec(bContext *C, wmOperator *op)
static bool gpencil_stroke_edit_poll(bContext *C)
void GPENCIL_OT_blank_frame_add(wmOperatorType *ot)
void GPENCIL_OT_annotation_active_frame_delete(wmOperatorType *ot)
void GPENCIL_OT_stroke_trim(wmOperatorType *ot)
static int gpencil_strokes_reproject_exec(bContext *C, wmOperator *op)
static bool gpencil_strokes_paste_poll(bContext *C)
void GPENCIL_OT_editmode_toggle(wmOperatorType *ot)
void GPENCIL_OT_active_frames_delete_all(wmOperatorType *ot)
void GPENCIL_OT_delete(wmOperatorType *ot)
static int gpencil_dissolve_selected_points(bContext *C, eGP_DissolveMode mode)
static int gpencil_stroke_apply_thickness_exec(bContext *C, wmOperator *UNUSED(op))
void GPENCIL_OT_stroke_merge_by_distance(wmOperatorType *ot)
static int gpencil_stroke_subdivide_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_vertexmode_toggle(wmOperatorType *ot)
bool ED_object_gpencil_exit(struct Main *bmain, Object *ob)
void GPENCIL_OT_stroke_apply_thickness(wmOperatorType *ot)
static bool gpencil_selectmode_toggle_poll(bContext *C)
static int gpencil_stroke_flip_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_paste(wmOperatorType *ot)
static int gpencil_move_to_layer_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_stroke_caps_set(wmOperatorType *ot)
static bool gpencil_actframe_delete_poll(bContext *C)
static bool gpencil_test_lasso(bGPDstroke *gps, bGPDspoint *pt, const GP_SpaceConversion *gsc, const float diff_mat[4][4], void *user_data)
static int gpencil_stroke_sample_exec(bContext *C, wmOperator *op)
static bool gpencil_snap_poll(bContext *C)
static int gpencil_sculptmode_toggle_exec(bContext *C, wmOperator *op)
static void gpencil_copy_move_point(bGPDstroke *gps, bGPDspoint *temp_points, MDeformVert *temp_dverts, int from_idx, int to_idx, const bool copy)
void GPENCIL_OT_stroke_separate(wmOperatorType *ot)
ListBase gpencil_strokes_copypastebuf
static int gpencil_snap_to_grid(bContext *C, wmOperator *UNUSED(op))
static int gpencil_stroke_smooth_exec(bContext *C, wmOperator *op)
static int gpencil_stroke_split_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_selection_opacity_toggle(wmOperatorType *ot)
static bool gpencil_paintmode_toggle_poll(bContext *C)
static void gpencil_curve_extrude_points(bGPdata *gpd, bGPDframe *gpf, bGPDstroke *gps, bGPDcurve *gpc)
static int gpencil_cutter_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_stroke_cutter(wmOperatorType *ot)
static int gpencil_actframe_delete_exec(bContext *C, wmOperator *op)
static int gpencil_weightmode_toggle_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_duplicate(wmOperatorType *ot)
static bool gpencil_cutter_poll(bContext *C)
void GPENCIL_OT_stroke_sample(wmOperatorType *ot)
void GPENCIL_OT_stroke_smooth(wmOperatorType *ot)
static int gpencil_stroke_simplify_fixed_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_selectmode_toggle(wmOperatorType *ot)
static int gpencil_stroke_caps_set_exec(bContext *C, wmOperator *op)
static int gpencil_count_subdivision_cuts(bGPDstroke *gps)
static int gpencil_strokes_copy_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_extrude(wmOperatorType *ot)
void GPENCIL_OT_reproject(wmOperatorType *ot)
GHash * gpencil_copybuf_validate_colormap(bContext *C)
static bool gpencil_subdivide_curve_edit_poll_property(const bContext *C, wmOperator *UNUSED(op), const PropertyRNA *prop)
static int gpencil_recalc_geometry_exec(bContext *C, wmOperator *UNUSED(op))
static int gpencil_merge_by_distance_exec(bContext *C, wmOperator *op)
static int gpencil_hideselect_toggle_exec(bContext *C, wmOperator *UNUSED(op))
void GPENCIL_OT_sculptmode_toggle(wmOperatorType *ot)
static bool gpencil_stroke_not_in_curve_edit_mode(bContext *C)
void GPENCIL_OT_stroke_join(wmOperatorType *ot)
static int gpencil_delete_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_stroke_subdivide(wmOperatorType *ot)
#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)
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)
bool gpencil_active_layer_poll(struct bContext *C)
#define GP_EDITABLE_STROKES_END(gpstroke_iter)
bool gpencil_add_poll(struct bContext *C)
void gpencil_point_to_xy(const GP_SpaceConversion *gsc, const struct bGPDstroke *gps, const struct bGPDspoint *pt, int *r_x, int *r_y)
bool ED_gpencil_stroke_material_editable(Object *ob, const bGPDlayer *gpl, const bGPDstroke *gps)
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])
void ED_gpencil_setup_modes(bContext *C, bGPdata *gpd, int newmode)
void ED_gpencil_stroke_reproject(Depsgraph *depsgraph, const GP_SpaceConversion *gsc, SnapObjectContext *sctx, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps, const eGP_ReprojectModes mode, const bool keep_original)
bGPdata * ED_annotation_data_get_active(const bContext *C)
bool ED_gpencil_stroke_can_use(const bContext *C, const bGPDstroke *gps)
void ED_gpencil_reset_layers_parent(Depsgraph *depsgraph, Object *obact, bGPdata *gpd)
bGPdata * ED_gpencil_data_get_active(const bContext *C)
bool ED_gpencil_layer_has_selected_stroke(const bGPDlayer *gpl, const bool is_multiedit)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const 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])
static void copy(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)
const char * RNA_property_identifier(const PropertyRNA *prop)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
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)
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)
struct BrushGpencilSettings * gpencil_settings
struct ToolSettings * toolsettings
bGPDcurve_point * curve_points
bGPDstroke_Runtime runtime
struct bGPDcurve * editcurve
struct MDeformVert * dvert
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
bool(* poll_property)(const struct bContext *C, struct wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_main_add_notifier(unsigned int type, void *reference)
int WM_operator_name_call(bContext *C, const char *opstring, short context, PointerRNA *properties)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
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]
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)
void WM_operator_properties_gesture_lasso(wmOperatorType *ot)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))