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/sculpt_paint/sculpt_uv.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/sculpt_paint/sculpt_uv.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_uv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index 5beaff5ef00..b652c509db9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -313,7 +313,7 @@ static void uv_sculpt_stroke_apply(bContext *C, { float co[2], radius, radius_root; Scene *scene = CTX_data_scene(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); BMEditMesh *em = BKE_editmesh_from_object(obedit); unsigned int tool; UvSculptData *sculptdata = (UvSculptData *)op->customdata; @@ -327,11 +327,11 @@ static void uv_sculpt_stroke_apply(bContext *C, tool = sculptdata->tool; invert = sculptdata->invert ? -1 : 1; alpha = BKE_brush_alpha_get(scene, brush); - UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); + UI_view2d_region_to_view(®ion->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); sima = CTX_wm_space_image(C); ED_space_image_get_size(sima, &width, &height); - ED_space_image_get_zoom(sima, ar, &zoomx, &zoomy); + ED_space_image_get_zoom(sima, region, &zoomx, &zoomy); radius = BKE_brush_size_get(scene, brush) / (width * zoomx); aspectRatio = width / (float)height; @@ -496,7 +496,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm if (data) { int counter = 0, i; - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); float co[2]; BMFace *efa; MLoopUV *luv; @@ -542,7 +542,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm } /* Mouse coordinates, useful for some functions like grab and sculpt all islands */ - UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); + UI_view2d_region_to_view(®ion->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); /* we need to find the active island here */ if (do_island_optimization) { @@ -704,7 +704,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm radius = BKE_brush_size_get(scene, brush); sima = CTX_wm_space_image(C); ED_space_image_get_size(sima, &width, &height); - ED_space_image_get_zoom(sima, ar, &zoomx, &zoomy); + ED_space_image_get_zoom(sima, region, &zoomx, &zoomy); aspectRatio = width / (float)height; radius /= (width * zoomx); |