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_add.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_add.c')
-rw-r--r-- | source/blender/editors/mask/mask_add.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c index 9945383211a..767976b5ae6 100644 --- a/source/blender/editors/mask/mask_add.c +++ b/source/blender/editors/mask/mask_add.c @@ -444,11 +444,11 @@ static void mask_point_make_pixel_space(bContext *C, float point_normalized[2], float point_pixel[2]) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); float scalex, scaley; - ED_mask_pixelspace_factor(sa, region, &scalex, &scaley); + ED_mask_pixelspace_factor(area, region, &scalex, &scaley); point_pixel[0] = point_normalized[0] * scalex; point_pixel[1] = point_normalized[1] * scaley; @@ -556,12 +556,12 @@ static int add_vertex_exec(bContext *C, wmOperator *op) static int add_vertex_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); @@ -648,12 +648,12 @@ static int add_feather_vertex_exec(bContext *C, wmOperator *op) static int add_feather_vertex_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); @@ -693,7 +693,7 @@ void MASK_OT_add_feather_vertex(wmOperatorType *ot) static int create_primitive_from_points( bContext *C, wmOperator *op, const float (*points)[2], int num_points, char handle_type) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); Mask *mask; MaskLayer *mask_layer; MaskSpline *new_spline; @@ -701,7 +701,7 @@ static int create_primitive_from_points( int i, width, height; int size = RNA_float_get(op->ptr, "size"); - ED_mask_get_size(sa, &width, &height); + ED_mask_get_size(area, &width, &height); scale = (float)size / max_ii(width, height); /* Get location in mask space. */ @@ -762,12 +762,12 @@ static int create_primitive_from_points( static int primitive_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); float cursor[2]; int width, height; - ED_mask_get_size(sa, &width, &height); - ED_mask_cursor_location_get(sa, cursor); + ED_mask_get_size(area, &width, &height); + ED_mask_cursor_location_get(area, cursor); cursor[0] *= width; cursor[1] *= height; |