diff options
author | Julian Eisel <julian@blender.org> | 2020-04-03 14:25:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-03 14:34:50 +0300 |
commit | 905c0269f302e8e0e7a27dda8d5256fdcd06ce60 (patch) | |
tree | 1c720d4f0069879d5b4c0c9ea8db867106920d4f /source/blender/editors/mask/mask_select.c | |
parent | 1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (diff) |
Cleanup: Rename ScrArea variables from sa to area
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
Diffstat (limited to 'source/blender/editors/mask/mask_select.c')
-rw-r--r-- | source/blender/editors/mask/mask_select.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c index b21d20b360a..12d8a9005a9 100644 --- a/source/blender/editors/mask/mask_select.c +++ b/source/blender/editors/mask/mask_select.c @@ -385,12 +385,12 @@ static int select_exec(bContext *C, wmOperator *op) static int select_invoke(bContext *C, wmOperator *op, const wmEvent *event) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); float co[2]; - ED_mask_mouse_pos(sa, region, event->mval, co); + ED_mask_mouse_pos(area, region, event->mval, co); RNA_float_set_array(op->ptr, "location", co); @@ -435,7 +435,7 @@ void MASK_OT_select(wmOperatorType *ot) static int box_select_exec(bContext *C, wmOperator *op) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); Mask *mask = CTX_data_edit_mask(C); @@ -454,8 +454,8 @@ static int box_select_exec(bContext *C, wmOperator *op) /* get rectangle from operator */ WM_operator_properties_border_to_rcti(op, &rect); - ED_mask_point_pos(sa, region, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin); - ED_mask_point_pos(sa, region, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax); + ED_mask_point_pos(area, region, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin); + ED_mask_point_pos(area, region, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax); /* do actual selection */ for (MaskLayer *mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) { @@ -525,7 +525,7 @@ static bool do_lasso_select_mask(bContext *C, short moves, const eSelectOp sel_op) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); Mask *mask = CTX_data_edit_mask(C); @@ -565,7 +565,7 @@ static bool do_lasso_select_mask(bContext *C, float screen_co[2]; /* point in screen coords */ - ED_mask_point_pos__reverse(sa, + ED_mask_point_pos__reverse(area, region, point_deform->bezt.vec[1][0], point_deform->bezt.vec[1][1], @@ -651,7 +651,7 @@ static int mask_spline_point_inside_ellipse(BezTriple *bezt, static int circle_select_exec(bContext *C, wmOperator *op) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); Mask *mask = CTX_data_edit_mask(C); @@ -667,14 +667,14 @@ static int circle_select_exec(bContext *C, wmOperator *op) const int radius = RNA_int_get(op->ptr, "radius"); /* compute ellipse and position in unified coordinates */ - ED_mask_get_size(sa, &width, &height); - ED_mask_zoom(sa, region, &zoomx, &zoomy); + ED_mask_get_size(area, &width, &height); + ED_mask_zoom(area, region, &zoomx, &zoomy); width = height = max_ii(width, height); ellipse[0] = width * zoomx / radius; ellipse[1] = height * zoomy / radius; - ED_mask_point_pos(sa, region, x, y, &offset[0], &offset[1]); + ED_mask_point_pos(area, region, x, y, &offset[0], &offset[1]); const eSelectOp sel_op = ED_select_op_modal(RNA_enum_get(op->ptr, "mode"), WM_gesture_is_modal_first(op->customdata)); @@ -748,7 +748,7 @@ void MASK_OT_select_circle(wmOperatorType *ot) static int mask_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); Mask *mask = CTX_data_edit_mask(C); @@ -760,7 +760,7 @@ static int mask_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmE const float threshold = 19; bool changed = false; - ED_mask_mouse_pos(sa, region, event->mval, co); + ED_mask_mouse_pos(area, region, event->mval, co); point = ED_mask_point_find_nearest(C, mask, co, threshold, &mask_layer, &spline, NULL, NULL); |