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/mesh/editmesh_extrude_spin_gizmo.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/mesh/editmesh_extrude_spin_gizmo.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c index af46d83265e..979c59632e1 100644 --- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c +++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c @@ -429,11 +429,11 @@ static void gizmo_mesh_spin_init_message_subscribe(const bContext *C, { GizmoGroupData_SpinInit *ggd = gzgroup->customdata; Scene *scene = CTX_data_scene(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); /* Subscribe to view properties */ wmMsgSubscribeValue msg_sub_value_gz_tag_refresh = { - .owner = ar, + .owner = region, .user_data = gzgroup->parent_gzmap, .notify = WM_gizmo_do_msg_notify_tag_refresh, }; @@ -905,8 +905,8 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) * Initialize the orientation from the spin gizmo if possible. */ { - ARegion *ar = CTX_wm_region(C); - wmGizmoMap *gzmap = ar->gizmo_map; + ARegion *region = CTX_wm_region(C); + wmGizmoMap *gzmap = region->gizmo_map; wmGizmoGroup *gzgroup_init = WM_gizmomap_group_find(gzmap, "MESH_GGT_spin"); if (gzgroup_init) { GizmoGroupData_SpinInit *ggd_init = gzgroup_init->customdata; @@ -926,7 +926,7 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) { wmWindow *win = CTX_wm_window(C); View3D *v3d = CTX_wm_view3d(C); - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); const wmEvent *event = win->eventstate; float plane_co[3], plane_no[3]; RNA_property_float_get_array(op->ptr, ggd->data.prop_axis_co, plane_co); @@ -937,11 +937,11 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) /* Use cursor as fallback if it's not set by the 'ortho_axis_active'. */ if (is_zero_v3(ggd->data.orient_axis_relative)) { float cursor_co[3]; - const int mval[2] = {event->x - ar->winrct.xmin, event->y - ar->winrct.ymin}; + const int mval[2] = {event->x - region->winrct.xmin, event->y - region->winrct.ymin}; float plane[4]; plane_from_point_normal_v3(plane, plane_co, plane_no); - if (UNLIKELY(!ED_view3d_win_to_3d_on_plane_int(ar, plane, mval, false, cursor_co))) { - ED_view3d_win_to_3d_int(v3d, ar, plane, mval, cursor_co); + if (UNLIKELY(!ED_view3d_win_to_3d_on_plane_int(region, plane, mval, false, cursor_co))) { + ED_view3d_win_to_3d_int(v3d, region, plane, mval, cursor_co); } sub_v3_v3v3(ggd->data.orient_axis_relative, cursor_co, plane_co); } @@ -1010,8 +1010,8 @@ static void gizmo_mesh_spin_redo_setup(const bContext *C, wmGizmoGroup *gzgroup) if (win && win->active) { bScreen *screen = WM_window_get_active_screen(win); if (screen->active_region) { - ARegion *ar = CTX_wm_region(C); - if (screen->active_region == ar) { + ARegion *region = CTX_wm_region(C); + if (screen->active_region == region) { /* Become modal as soon as it's started. */ gizmo_mesh_spin_redo_modal_from_setup(C, gzgroup); } |