From a81108ae74bde032c004b6a9bfb116d8e43f9283 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 31 Oct 2019 15:36:43 +0100 Subject: Masking: Cleanup, naming of mask layer --- source/blender/editors/mask/mask_ops.c | 206 ++++++++++++++++----------------- 1 file changed, 103 insertions(+), 103 deletions(-) (limited to 'source/blender/editors/mask/mask_ops.c') diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index c91f431ad20..b40bddacb49 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -69,7 +69,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, Mask *mask_orig, const float normal_co[2], const float threshold, - MaskLayer **masklay_r, + MaskLayer **mask_layer_r, MaskSpline **spline_r, eMaskWhichHandle *which_handle_r, float *score) @@ -77,7 +77,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, ScrArea *sa = CTX_wm_area(C); ARegion *ar = CTX_wm_region(C); - MaskLayer *point_masklay = NULL; + MaskLayer *point_mask_layer = NULL; MaskSpline *point_spline = NULL; MaskSplinePoint *point = NULL; float co[2]; @@ -95,17 +95,17 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, co[0] = normal_co[0] * scalex; co[1] = normal_co[1] * scaley; - for (MaskLayer *masklay_orig = mask_orig->masklayers.first, - *masklay_eval = mask_eval->masklayers.first; - masklay_orig != NULL; - masklay_orig = masklay_orig->next, masklay_eval = masklay_eval->next) { + for (MaskLayer *mask_layer_orig = mask_orig->masklayers.first, + *mask_layer_eval = mask_eval->masklayers.first; + mask_layer_orig != NULL; + mask_layer_orig = mask_layer_orig->next, mask_layer_eval = mask_layer_eval->next) { - if (masklay_orig->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { + if (mask_layer_orig->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; } - for (MaskSpline *spline_orig = masklay_orig->splines.first, - *spline_eval = masklay_eval->splines.first; + for (MaskSpline *spline_orig = mask_layer_orig->splines.first, + *spline_eval = mask_layer_eval->splines.first; spline_orig != NULL; spline_orig = spline_orig->next, spline_eval = spline_eval->next) { MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline_eval); @@ -124,7 +124,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, if (cur_len_sq < len_sq) { point_spline = spline_orig; - point_masklay = masklay_orig; + point_mask_layer = mask_layer_orig; point = cur_point_orig; len_sq = cur_len_sq; which_handle = MASK_WHICH_HANDLE_NONE; @@ -174,7 +174,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, } if (cur_len_sq <= len_sq && cur_which_handle != MASK_WHICH_HANDLE_NONE) { - point_masklay = masklay_orig; + point_mask_layer = mask_layer_orig; point_spline = spline_orig; point = cur_point_orig; len_sq = cur_len_sq; @@ -185,8 +185,8 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, } if (len_sq < threshold_sq) { - if (masklay_r) { - *masklay_r = point_masklay; + if (mask_layer_r) { + *mask_layer_r = point_mask_layer; } if (spline_r) { @@ -204,8 +204,8 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, return point; } - if (masklay_r) { - *masklay_r = NULL; + if (mask_layer_r) { + *mask_layer_r = NULL; } if (spline_r) { @@ -223,7 +223,7 @@ bool ED_mask_feather_find_nearest(const bContext *C, Mask *mask_orig, const float normal_co[2], const float threshold, - MaskLayer **masklay_r, + MaskLayer **mask_layer_r, MaskSpline **spline_r, MaskSplinePoint **point_r, MaskSplinePointUW **uw_r, @@ -232,7 +232,7 @@ bool ED_mask_feather_find_nearest(const bContext *C, ScrArea *sa = CTX_wm_area(C); ARegion *ar = CTX_wm_region(C); - MaskLayer *point_masklay = NULL; + MaskLayer *point_mask_layer = NULL; MaskSpline *point_spline = NULL; MaskSplinePoint *point = NULL; MaskSplinePointUW *uw = NULL; @@ -250,13 +250,13 @@ bool ED_mask_feather_find_nearest(const bContext *C, co[0] = normal_co[0] * scalex; co[1] = normal_co[1] * scaley; - for (MaskLayer *masklay_orig = mask_orig->masklayers.first, - *masklay_eval = mask_eval->masklayers.first; - masklay_orig != NULL; - masklay_orig = masklay_orig->next, masklay_eval = masklay_eval->next) { + for (MaskLayer *mask_layer_orig = mask_orig->masklayers.first, + *mask_layer_eval = mask_eval->masklayers.first; + mask_layer_orig != NULL; + mask_layer_orig = mask_layer_orig->next, mask_layer_eval = mask_layer_eval->next) { - for (MaskSpline *spline_orig = masklay_orig->splines.first, - *spline_eval = masklay_eval->splines.first; + for (MaskSpline *spline_orig = mask_layer_orig->splines.first, + *spline_eval = mask_layer_eval->splines.first; spline_orig != NULL; spline_orig = spline_orig->next, spline_eval = spline_eval->next) { // MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline); @@ -264,7 +264,7 @@ bool ED_mask_feather_find_nearest(const bContext *C, int i, tot_feather_point; float(*feather_points)[2], (*fp)[2]; - if (masklay_orig->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { + if (mask_layer_orig->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; } @@ -291,7 +291,7 @@ bool ED_mask_feather_find_nearest(const bContext *C, uw = &cur_point_orig->uw[j - 1]; } - point_masklay = masklay_orig; + point_mask_layer = mask_layer_orig; point_spline = spline_orig; point = cur_point_orig; len = cur_len_sq; @@ -306,8 +306,8 @@ bool ED_mask_feather_find_nearest(const bContext *C, } if (len < threshold_sq) { - if (masklay_r) { - *masklay_r = point_masklay; + if (mask_layer_r) { + *mask_layer_r = point_mask_layer; } if (spline_r) { @@ -329,8 +329,8 @@ bool ED_mask_feather_find_nearest(const bContext *C, return true; } - if (masklay_r) { - *masklay_r = NULL; + if (mask_layer_r) { + *mask_layer_r = NULL; } if (spline_r) { @@ -428,9 +428,9 @@ void MASK_OT_new(wmOperatorType *ot) RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Name of new mask"); } -/******************** create new masklay *********************/ +/******************** create new mask layer *********************/ -static int masklay_new_exec(bContext *C, wmOperator *op) +static int mask_layer_new_exec(bContext *C, wmOperator *op) { Mask *mask = CTX_data_edit_mask(C); char name[MAX_ID_NAME - 2]; @@ -454,7 +454,7 @@ void MASK_OT_layer_new(wmOperatorType *ot) ot->idname = "MASK_OT_layer_new"; /* api callbacks */ - ot->exec = masklay_new_exec; + ot->exec = mask_layer_new_exec; ot->poll = ED_maskedit_poll; /* flags */ @@ -466,13 +466,13 @@ void MASK_OT_layer_new(wmOperatorType *ot) /******************** remove mask layer *********************/ -static int masklay_remove_exec(bContext *C, wmOperator *UNUSED(op)) +static int mask_layer_remove_exec(bContext *C, wmOperator *UNUSED(op)) { Mask *mask = CTX_data_edit_mask(C); - MaskLayer *masklay = BKE_mask_layer_active(mask); + MaskLayer *mask_layer = BKE_mask_layer_active(mask); - if (masklay) { - BKE_mask_layer_remove(mask, masklay); + if (mask_layer) { + BKE_mask_layer_remove(mask, mask_layer); WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask); DEG_id_tag_update(&mask->id, ID_RECALC_COPY_ON_WRITE); @@ -489,7 +489,7 @@ void MASK_OT_layer_remove(wmOperatorType *ot) ot->idname = "MASK_OT_layer_remove"; /* api callbacks */ - ot->exec = masklay_remove_exec; + ot->exec = mask_layer_remove_exec; ot->poll = ED_maskedit_poll; /* flags */ @@ -511,7 +511,7 @@ typedef struct SlidePointData { short event_invoke_type; int action; Mask *mask; - MaskLayer *masklay; + MaskLayer *mask_layer; MaskSpline *spline, *orig_spline; MaskSplinePoint *point; MaskSplinePointUW *uw; @@ -719,7 +719,7 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent * Mask *mask = CTX_data_edit_mask(C); SlidePointData *customdata = NULL; - MaskLayer *masklay, *cv_masklay, *feather_masklay; + MaskLayer *mask_layer, *cv_mask_layer, *feather_mask_layer; MaskSpline *spline, *cv_spline, *feather_spline; MaskSplinePoint *point, *cv_point, *feather_point; MaskSplinePointUW *uw = NULL; @@ -733,13 +733,13 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent * ED_mask_get_size(sa, &width, &height); cv_point = ED_mask_point_find_nearest( - C, mask, co, threshold, &cv_masklay, &cv_spline, &which_handle, &cv_score); + C, mask, co, threshold, &cv_mask_layer, &cv_spline, &which_handle, &cv_score); if (ED_mask_feather_find_nearest(C, mask, co, threshold, - &feather_masklay, + &feather_mask_layer, &feather_spline, &feather_point, &uw, @@ -747,7 +747,7 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent * if (slide_feather || !cv_point || feather_score < cv_score) { action = SLIDE_ACTION_FEATHER; - masklay = feather_masklay; + mask_layer = feather_mask_layer; spline = feather_spline; point = feather_point; } @@ -761,13 +761,13 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent * action = SLIDE_ACTION_POINT; } - masklay = cv_masklay; + mask_layer = cv_mask_layer; spline = cv_spline; point = cv_point; } if (action == SLIDE_ACTION_NONE) { - if (spline_under_mouse_get(C, mask, co, &masklay, &spline)) { + if (spline_under_mouse_get(C, mask, co, &mask_layer, &spline)) { action = SLIDE_ACTION_SPLINE; point = NULL; } @@ -777,7 +777,7 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent * customdata = MEM_callocN(sizeof(SlidePointData), "mask slide point data"); customdata->event_invoke_type = event->type; customdata->mask = mask; - customdata->masklay = masklay; + customdata->mask_layer = mask_layer; customdata->spline = spline; customdata->point = point; customdata->width = width; @@ -790,7 +790,7 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent * if (customdata->action != SLIDE_ACTION_SPLINE) { customdata->old_h1 = point->bezt.h1; customdata->old_h2 = point->bezt.h2; - select_sliding_point(mask, masklay, spline, point, which_handle); + select_sliding_point(mask, mask_layer, spline, point, which_handle); check_sliding_handle_type(point, which_handle); } @@ -850,8 +850,8 @@ static int slide_point_invoke(bContext *C, wmOperator *op, const wmEvent *event) WM_event_add_modal_handler(C, op); - slidedata->masklay->act_spline = slidedata->spline; - slidedata->masklay->act_point = slidedata->point; + slidedata->mask_layer->act_spline = slidedata->spline; + slidedata->mask_layer->act_point = slidedata->point; WM_event_add_notifier(C, NC_MASK | ND_SELECT, mask); @@ -1140,7 +1140,7 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event) /* dont key sliding feather uw's */ if ((data->action == SLIDE_ACTION_FEATHER && data->uw) == false) { if (IS_AUTOKEY_ON(scene)) { - ED_mask_layer_shape_auto_key(data->masklay, CFRA); + ED_mask_layer_shape_auto_key(data->mask_layer, CFRA); } } @@ -1586,16 +1586,16 @@ void MASK_OT_slide_spline_curvature(wmOperatorType *ot) static int cyclic_toggle_exec(bContext *C, wmOperator *UNUSED(op)) { Mask *mask = CTX_data_edit_mask(C); - MaskLayer *masklay; + MaskLayer *mask_layer; - for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { + for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) { MaskSpline *spline; - if (masklay->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { + if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; } - for (spline = masklay->splines.first; spline; spline = spline->next) { + for (spline = mask_layer->splines.first; spline; spline = spline->next) { if (ED_mask_spline_select_check(spline)) { spline->flag ^= MASK_SPLINE_CYCLIC; } @@ -1666,18 +1666,18 @@ static void delete_feather_points(MaskSplinePoint *point) static int delete_exec(bContext *C, wmOperator *UNUSED(op)) { Mask *mask = CTX_data_edit_mask(C); - MaskLayer *masklay; + MaskLayer *mask_layer; bool changed = false; - for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { + for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) { MaskSpline *spline; int mask_layer_shape_ofs = 0; - if (masklay->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { + if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; } - spline = masklay->splines.first; + spline = mask_layer->splines.first; while (spline) { const int tot_point_orig = spline->tot_point; @@ -1695,15 +1695,15 @@ static int delete_exec(bContext *C, wmOperator *UNUSED(op)) if (count == 0) { /* delete the whole spline */ - BLI_remlink(&masklay->splines, spline); + BLI_remlink(&mask_layer->splines, spline); BKE_mask_spline_free(spline); - if (spline == masklay->act_spline) { - masklay->act_spline = NULL; - masklay->act_point = NULL; + if (spline == mask_layer->act_spline) { + mask_layer->act_spline = NULL; + mask_layer->act_point = NULL; } - BKE_mask_layer_shape_changed_remove(masklay, mask_layer_shape_ofs, tot_point_orig); + BKE_mask_layer_shape_changed_remove(mask_layer, mask_layer_shape_ofs, tot_point_orig); } else { MaskSplinePoint *new_points; @@ -1715,8 +1715,8 @@ static int delete_exec(bContext *C, wmOperator *UNUSED(op)) MaskSplinePoint *point = &spline->points[i]; if (!MASKPOINT_ISSEL_ANY(point)) { - if (point == masklay->act_point) { - masklay->act_point = &new_points[j]; + if (point == mask_layer->act_point) { + mask_layer->act_point = &new_points[j]; } delete_feather_points(point); @@ -1725,14 +1725,14 @@ static int delete_exec(bContext *C, wmOperator *UNUSED(op)) j++; } else { - if (point == masklay->act_point) { - masklay->act_point = NULL; + if (point == mask_layer->act_point) { + mask_layer->act_point = NULL; } BKE_mask_point_free(point); spline->tot_point--; - BKE_mask_layer_shape_changed_remove(masklay, mask_layer_shape_ofs + j, 1); + BKE_mask_layer_shape_changed_remove(mask_layer, mask_layer_shape_ofs + j, 1); } } @@ -1750,8 +1750,8 @@ static int delete_exec(bContext *C, wmOperator *UNUSED(op)) /* not essential but confuses users when there are keys with no data! * assume if they delete all data from the layer they also dont care about keys */ - if (BLI_listbase_is_empty(&masklay->splines)) { - BKE_mask_layer_free_shapes(masklay); + if (BLI_listbase_is_empty(&mask_layer->splines)) { + BKE_mask_layer_free_shapes(mask_layer); } } @@ -1787,22 +1787,22 @@ static int mask_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); Mask *mask = CTX_data_edit_mask(C); - MaskLayer *masklay; + MaskLayer *mask_layer; bool changed = false; /* do actual selection */ - for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { + for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) { MaskSpline *spline; bool changed_layer = false; - if (masklay->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { + if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; } - for (spline = masklay->splines.first; spline; spline = spline->next) { + for (spline = mask_layer->splines.first; spline; spline = spline->next) { if (ED_mask_spline_select_check(spline)) { - BKE_mask_spline_direction_switch(masklay, spline); + BKE_mask_spline_direction_switch(mask_layer, spline); changed = true; changed_layer = true; } @@ -1810,7 +1810,7 @@ static int mask_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) if (changed_layer) { if (IS_AUTOKEY_ON(scene)) { - ED_mask_layer_shape_auto_key(masklay, CFRA); + ED_mask_layer_shape_auto_key(mask_layer, CFRA); } } } @@ -1847,21 +1847,21 @@ static int mask_normals_make_consistent_exec(bContext *C, wmOperator *UNUSED(op) { Scene *scene = CTX_data_scene(C); Mask *mask = CTX_data_edit_mask(C); - MaskLayer *masklay; + MaskLayer *mask_layer; int i; bool changed = false; /* do actual selection */ - for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { + for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) { MaskSpline *spline; bool changed_layer = false; - if (masklay->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { + if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; } - for (spline = masklay->splines.first; spline; spline = spline->next) { + for (spline = mask_layer->splines.first; spline; spline = spline->next) { for (i = 0; i < spline->tot_point; i++) { MaskSplinePoint *point = &spline->points[i]; @@ -1875,7 +1875,7 @@ static int mask_normals_make_consistent_exec(bContext *C, wmOperator *UNUSED(op) if (changed_layer) { if (IS_AUTOKEY_ON(scene)) { - ED_mask_layer_shape_auto_key(masklay, CFRA); + ED_mask_layer_shape_auto_key(mask_layer, CFRA); } } } @@ -1913,20 +1913,20 @@ void MASK_OT_normals_make_consistent(wmOperatorType *ot) static int set_handle_type_exec(bContext *C, wmOperator *op) { Mask *mask = CTX_data_edit_mask(C); - MaskLayer *masklay; + MaskLayer *mask_layer; int handle_type = RNA_enum_get(op->ptr, "type"); bool changed = false; - for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { + for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) { MaskSpline *spline; int i; - if (masklay->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { + if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; } - for (spline = masklay->splines.first; spline; spline = spline->next) { + for (spline = mask_layer->splines.first; spline; spline = spline->next) { for (i = 0; i < spline->tot_point; i++) { MaskSplinePoint *point = &spline->points[i]; @@ -1999,15 +1999,15 @@ void MASK_OT_handle_type_set(wmOperatorType *ot) static int mask_hide_view_clear_exec(bContext *C, wmOperator *op) { Mask *mask = CTX_data_edit_mask(C); - MaskLayer *masklay; + MaskLayer *mask_layer; bool changed = false; const bool select = RNA_boolean_get(op->ptr, "select"); - for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { + for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) { - if (masklay->restrictflag & OB_RESTRICT_VIEWPORT) { - ED_mask_layer_select_set(masklay, select); - masklay->restrictflag &= ~OB_RESTRICT_VIEWPORT; + if (mask_layer->restrictflag & OB_RESTRICT_VIEWPORT) { + ED_mask_layer_select_set(mask_layer, select); + mask_layer->restrictflag &= ~OB_RESTRICT_VIEWPORT; changed = true; } } @@ -2044,32 +2044,32 @@ void MASK_OT_hide_view_clear(wmOperatorType *ot) static int mask_hide_view_set_exec(bContext *C, wmOperator *op) { Mask *mask = CTX_data_edit_mask(C); - MaskLayer *masklay; + MaskLayer *mask_layer; const bool unselected = RNA_boolean_get(op->ptr, "unselected"); bool changed = false; - for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { + for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) { - if (masklay->restrictflag & MASK_RESTRICT_SELECT) { + if (mask_layer->restrictflag & MASK_RESTRICT_SELECT) { continue; } if (!unselected) { - if (ED_mask_layer_select_check(masklay)) { - ED_mask_layer_select_set(masklay, false); + if (ED_mask_layer_select_check(mask_layer)) { + ED_mask_layer_select_set(mask_layer, false); - masklay->restrictflag |= OB_RESTRICT_VIEWPORT; + mask_layer->restrictflag |= OB_RESTRICT_VIEWPORT; changed = true; - if (masklay == BKE_mask_layer_active(mask)) { + if (mask_layer == BKE_mask_layer_active(mask)) { BKE_mask_layer_active_set(mask, NULL); } } } else { - if (!ED_mask_layer_select_check(masklay)) { - masklay->restrictflag |= OB_RESTRICT_VIEWPORT; + if (!ED_mask_layer_select_check(mask_layer)) { + mask_layer->restrictflag |= OB_RESTRICT_VIEWPORT; changed = true; - if (masklay == BKE_mask_layer_active(mask)) { + if (mask_layer == BKE_mask_layer_active(mask)) { BKE_mask_layer_active_set(mask, NULL); } } @@ -2108,18 +2108,18 @@ void MASK_OT_hide_view_set(wmOperatorType *ot) static int mask_feather_weight_clear_exec(bContext *C, wmOperator *UNUSED(op)) { Mask *mask = CTX_data_edit_mask(C); - MaskLayer *masklay; + MaskLayer *mask_layer; bool changed = false; int i; - for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { + for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) { MaskSpline *spline; - if (masklay->restrictflag & (MASK_RESTRICT_SELECT | MASK_RESTRICT_VIEW)) { + if (mask_layer->restrictflag & (MASK_RESTRICT_SELECT | MASK_RESTRICT_VIEW)) { continue; } - for (spline = masklay->splines.first; spline; spline = spline->next) { + for (spline = mask_layer->splines.first; spline; spline = spline->next) { for (i = 0; i < spline->tot_point; i++) { MaskSplinePoint *point = &spline->points[i]; -- cgit v1.2.3