diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-02-20 12:16:51 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-02-20 12:16:59 +0300 |
commit | 173b6b792cf95fb9eb20ec760b28469d46b0ff52 (patch) | |
tree | d1ae9e54c06d3972e7bba5fe2c667a35a51fbf29 /source/blender/editors/gpencil/gpencil_utils.c | |
parent | 37e6a1995ac7eeabd5b6a56621ad5a850dae4149 (diff) |
Cleanup: Split grease pencil selection index functions
This makes the code more readable.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index f9242c5a1a8..5c041134a74 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -1167,7 +1167,7 @@ void ED_gpencil_stroke_reproject(Depsgraph *depsgraph, if (keep_original) { gps_active = BKE_gpencil_stroke_duplicate(gps, true, true); gps_active->flag &= ~GP_STROKE_SELECT; - BKE_gpencil_stroke_select_index_set(NULL, gps_active, true); + BKE_gpencil_stroke_select_index_reset(gps_active); for (i = 0, pt = gps_active->points; i < gps_active->totpoints; i++, pt++) { pt->flag &= ~GP_SPOINT_SELECT; } @@ -1692,7 +1692,7 @@ void ED_gpencil_vgroup_select(bContext *C, Object *ob) } if (gps->flag & GP_STROKE_SELECT) { - BKE_gpencil_stroke_select_index_set(gpd, gps, false); + BKE_gpencil_stroke_select_index_set(gpd, gps); } } } @@ -2616,7 +2616,7 @@ void ED_gpencil_select_toggle_all(bContext *C, int action) } gps->flag &= ~GP_STROKE_SELECT; - BKE_gpencil_stroke_select_index_set(NULL, gps, true); + BKE_gpencil_stroke_select_index_reset(gps); } } } @@ -2654,11 +2654,11 @@ void ED_gpencil_select_toggle_all(bContext *C, int action) /* Change status of stroke */ if (selected) { gps->flag |= GP_STROKE_SELECT; - BKE_gpencil_stroke_select_index_set(gpd, gps, false); + BKE_gpencil_stroke_select_index_set(gpd, gps); } else { gps->flag &= ~GP_STROKE_SELECT; - BKE_gpencil_stroke_select_index_set(NULL, gps, true); + BKE_gpencil_stroke_select_index_reset(gps); } } CTX_DATA_END; @@ -2695,7 +2695,7 @@ void ED_gpencil_select_curve_toggle_all(bContext *C, int action) } gpc->flag &= ~GP_CURVE_SELECT; gps->flag &= ~GP_STROKE_SELECT; - BKE_gpencil_stroke_select_index_set(NULL, gps, true); + BKE_gpencil_stroke_select_index_reset(gps); } GP_EDITABLE_CURVES_END(gps_iter); } @@ -2737,12 +2737,12 @@ void ED_gpencil_select_curve_toggle_all(bContext *C, int action) if (selected) { 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); } else { gpc->flag &= ~GP_CURVE_SELECT; gps->flag &= ~GP_STROKE_SELECT; - BKE_gpencil_stroke_select_index_set(NULL, gps, true); + BKE_gpencil_stroke_select_index_reset(gps); } } GP_EDITABLE_STROKES_END(gps_iter); |