diff options
author | Julian Eisel <julian@blender.org> | 2020-03-06 18:56:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-06 19:19:23 +0300 |
commit | b2ee1770d4c31078518f4ec9edd5196a41345162 (patch) | |
tree | 6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/editors/mask/mask_ops.c | |
parent | b825a95ec311a169d33fe21e28418f11a516c82f (diff) |
Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
Diffstat (limited to 'source/blender/editors/mask/mask_ops.c')
-rw-r--r-- | source/blender/editors/mask/mask_ops.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 3a982b255f0..cff0bcef38b 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -75,7 +75,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, float *score) { ScrArea *sa = CTX_wm_area(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); MaskLayer *point_mask_layer = NULL; MaskSpline *point_spline = NULL; @@ -90,7 +90,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_orig->id); ED_mask_get_size(sa, &width, &height); - ED_mask_pixelspace_factor(sa, ar, &scalex, &scaley); + ED_mask_pixelspace_factor(sa, region, &scalex, &scaley); co[0] = normal_co[0] * scalex; co[1] = normal_co[1] * scaley; @@ -230,7 +230,7 @@ bool ED_mask_feather_find_nearest(const bContext *C, float *score) { ScrArea *sa = CTX_wm_area(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); MaskLayer *point_mask_layer = NULL; MaskSpline *point_spline = NULL; @@ -245,7 +245,7 @@ bool ED_mask_feather_find_nearest(const bContext *C, Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_orig->id); ED_mask_get_size(sa, &width, &height); - ED_mask_pixelspace_factor(sa, ar, &scalex, &scaley); + ED_mask_pixelspace_factor(sa, region, &scalex, &scaley); co[0] = normal_co[0] * scalex; co[1] = normal_co[1] * scaley; @@ -714,7 +714,7 @@ static void check_sliding_handle_type(MaskSplinePoint *point, eMaskWhichHandle w static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent *event) { ScrArea *sa = CTX_wm_area(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); Mask *mask = CTX_data_edit_mask(C); SlidePointData *customdata = NULL; @@ -728,7 +728,7 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent * const float threshold = 19; eMaskWhichHandle which_handle; - ED_mask_mouse_pos(sa, ar, event->mval, co); + ED_mask_mouse_pos(sa, region, event->mval, co); ED_mask_get_size(sa, &width, &height); cv_point = ED_mask_point_find_nearest( @@ -827,7 +827,7 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent * } customdata->which_handle = which_handle; - ED_mask_mouse_pos(sa, ar, event->mval, customdata->prev_mouse_coord); + ED_mask_mouse_pos(sa, region, event->mval, customdata->prev_mouse_coord); } return customdata; @@ -952,10 +952,10 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_FALLTHROUGH; /* update CV position */ case MOUSEMOVE: { ScrArea *sa = CTX_wm_area(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); float delta[2]; - ED_mask_mouse_pos(sa, ar, event->mval, co); + ED_mask_mouse_pos(sa, region, event->mval, co); sub_v2_v2v2(delta, co, data->prev_mouse_coord); if (data->is_accurate) { mul_v2_fl(delta, 0.2f); |