From b2ee1770d4c31078518f4ec9edd5196a41345162 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 6 Mar 2020 16:56:42 +0100 Subject: 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. --- source/blender/editors/gizmo_library/gizmo_library_utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/gizmo_library/gizmo_library_utils.c') diff --git a/source/blender/editors/gizmo_library/gizmo_library_utils.c b/source/blender/editors/gizmo_library/gizmo_library_utils.c index 1f61c45eb80..1964a2ff1a3 100644 --- a/source/blender/editors/gizmo_library/gizmo_library_utils.c +++ b/source/blender/editors/gizmo_library/gizmo_library_utils.c @@ -196,12 +196,12 @@ bool gizmo_window_project_2d(bContext *C, /* rotate mouse in relation to the center and relocate it */ if (gz->parent_gzgroup->type->flag & WM_GIZMOGROUPTYPE_3D) { /* For 3d views, transform 2D mouse pos onto plane. */ - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); float plane[4], co[3]; plane_from_point_normal_v3(plane, mat[3], mat[2]); - bool clip_ray = ((RegionView3D *)ar->regiondata)->is_persp; - if (ED_view3d_win_to_3d_on_plane(ar, plane, mval, clip_ray, co)) { + bool clip_ray = ((RegionView3D *)region->regiondata)->is_persp; + if (ED_view3d_win_to_3d_on_plane(region, plane, mval, clip_ray, co)) { float imat[4][4]; invert_m4_m4(imat, mat); mul_m4_v3(imat, co); @@ -237,10 +237,10 @@ bool gizmo_window_project_3d( if (gz->parent_gzgroup->type->flag & WM_GIZMOGROUPTYPE_3D) { View3D *v3d = CTX_wm_view3d(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); /* Note: we might want a custom reference point passed in, * instead of the gizmo center. */ - ED_view3d_win_to_3d(v3d, ar, mat[3], mval, r_co); + ED_view3d_win_to_3d(v3d, region, mat[3], mval, r_co); invert_m4(mat); mul_m4_v3(mat, r_co); return true; -- cgit v1.2.3