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/gpencil/gpencil_convert.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/gpencil/gpencil_convert.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_convert.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 296b4707c4b..255f17f13cc 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -161,7 +161,7 @@ static void gp_strokepoint_convertcoords(bContext *C, { Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); /* TODO(sergey): This function might be called from a loop, but no tagging is happening in it, * so it's not that expensive to ensure evaluated depsgraph here. However, ideally all the * parameters are to wrapped into a context style struct and queried from Context once.*/ @@ -188,7 +188,7 @@ static void gp_strokepoint_convertcoords(bContext *C, /* get screen coordinate */ if (gps->flag & GP_STROKE_2DSPACE) { - View2D *v2d = &ar->v2d; + View2D *v2d = ®ion->v2d; UI_view2d_view_to_region_fl(v2d, pt->x, pt->y, &mvalf[0], &mvalf[1]); } else { @@ -197,12 +197,12 @@ static void gp_strokepoint_convertcoords(bContext *C, mvalf[1] = (((float)pt->y / 100.0f) * BLI_rctf_size_y(subrect)) + subrect->ymin; } else { - mvalf[0] = (float)pt->x / 100.0f * ar->winx; - mvalf[1] = (float)pt->y / 100.0f * ar->winy; + mvalf[0] = (float)pt->x / 100.0f * region->winx; + mvalf[1] = (float)pt->y / 100.0f * region->winy; } } - ED_view3d_win_to_3d(v3d, ar, fp, mvalf, p3d); + ED_view3d_win_to_3d(v3d, region, fp, mvalf, p3d); } } @@ -1236,16 +1236,16 @@ static void gp_stroke_norm_curve_weights(Curve *cu, const float minmax_weights[2 static int gp_camera_view_subrect(bContext *C, rctf *subrect) { View3D *v3d = CTX_wm_view3d(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); if (v3d) { - RegionView3D *rv3d = ar->regiondata; + RegionView3D *rv3d = region->regiondata; /* for camera view set the subrect */ if (rv3d->persp == RV3D_CAMOB) { Scene *scene = CTX_data_scene(C); Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); - ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, subrect, true); + ED_view3d_calc_camera_border(scene, depsgraph, region, v3d, rv3d, subrect, true); return 1; } } |