Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-02-20 12:16:51 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-02-20 12:16:59 +0300
commit173b6b792cf95fb9eb20ec760b28469d46b0ff52 (patch)
treed1ae9e54c06d3972e7bba5fe2c667a35a51fbf29 /source/blender/blenkernel/intern/gpencil_curve.c
parent37e6a1995ac7eeabd5b6a56621ad5a850dae4149 (diff)
Cleanup: Split grease pencil selection index functions
This makes the code more readable.
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil_curve.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil_curve.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c
index a1cae205d39..88d3e917a7a 100644
--- a/source/blender/blenkernel/intern/gpencil_curve.c
+++ b/source/blender/blenkernel/intern/gpencil_curve.c
@@ -814,7 +814,7 @@ void BKE_gpencil_stroke_editcurve_sync_selection(bGPdata *gpd, bGPDstroke *gps,
{
if (gpc->flag & GP_CURVE_SELECT) {
gps->flag |= GP_STROKE_SELECT;
- BKE_gpencil_stroke_select_index_set(gpd, gps, false);
+ BKE_gpencil_stroke_select_index_set(gpd, gps);
for (int i = 0; i < gpc->tot_curve_points - 1; i++) {
bGPDcurve_point *gpc_pt = &gpc->curve_points[i];
@@ -868,7 +868,7 @@ void BKE_gpencil_stroke_editcurve_sync_selection(bGPdata *gpd, bGPDstroke *gps,
}
else {
gps->flag &= ~GP_STROKE_SELECT;
- BKE_gpencil_stroke_select_index_set(NULL, gps, true);
+ BKE_gpencil_stroke_select_index_reset(gps);
for (int i = 0; i < gps->totpoints; i++) {
bGPDspoint *pt = &gps->points[i];
pt->flag &= ~GP_SPOINT_SELECT;
@@ -1093,7 +1093,7 @@ void BKE_gpencil_stroke_update_geometry_from_editcurve(bGPDstroke *gps,
/* deselect */
pt->flag &= ~GP_SPOINT_SELECT;
gps->flag &= ~GP_STROKE_SELECT;
- BKE_gpencil_stroke_select_index_set(NULL, gps, true);
+ BKE_gpencil_stroke_select_index_reset(gps);
return;
}
@@ -1136,7 +1136,7 @@ void BKE_gpencil_stroke_update_geometry_from_editcurve(bGPDstroke *gps,
pt->flag &= ~GP_SPOINT_SELECT;
}
gps->flag &= ~GP_STROKE_SELECT;
- BKE_gpencil_stroke_select_index_set(NULL, gps, true);
+ BKE_gpencil_stroke_select_index_reset(gps);
/* free temp data */
MEM_freeN(points);