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/mesh/editmesh_polybuild.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_polybuild.c') diff --git a/source/blender/editors/mesh/editmesh_polybuild.c b/source/blender/editors/mesh/editmesh_polybuild.c index c9438f43e04..fac0fc72c0b 100644 --- a/source/blender/editors/mesh/editmesh_polybuild.c +++ b/source/blender/editors/mesh/editmesh_polybuild.c @@ -87,10 +87,10 @@ static void edbm_flag_disable_all_multi(ViewLayer *view_layer, View3D *v3d, cons /* When accessed as a tool, get the active edge from the preselection gizmo. */ static bool edbm_preselect_or_active(bContext *C, const View3D *v3d, Base **r_base, BMElem **r_ele) { - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); const bool show_gizmo = !((v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_TOOL))); - wmGizmoMap *gzmap = show_gizmo ? ar->gizmo_map : NULL; + wmGizmoMap *gzmap = show_gizmo ? region->gizmo_map : NULL; wmGizmoGroup *gzgroup = gzmap ? WM_gizmomap_group_find(gzmap, "VIEW3D_GGT_mesh_preselect_elem") : NULL; if (gzgroup != NULL) { @@ -296,7 +296,7 @@ static int edbm_polybuild_face_at_cursor_invoke(bContext *C, wmOperator *op, con /* Just add vert */ copy_v3_v3(center, vc.scene->cursor.location); mul_v3_m4v3(center, vc.obedit->obmat, center); - ED_view3d_win_to_3d_int(vc.v3d, vc.ar, center, event->mval, center); + ED_view3d_win_to_3d_int(vc.v3d, vc.region, center, event->mval, center); mul_m4_v3(vc.obedit->imat, center); BMVert *v_new = BM_vert_create(bm, center, NULL, BM_CREATE_NOP); @@ -311,7 +311,7 @@ static int edbm_polybuild_face_at_cursor_invoke(bContext *C, wmOperator *op, con mid_v3_v3v3(center, e_act->v1->co, e_act->v2->co); mul_m4_v3(vc.obedit->obmat, center); - ED_view3d_win_to_3d_int(vc.v3d, vc.ar, center, event->mval, center); + ED_view3d_win_to_3d_int(vc.v3d, vc.region, center, event->mval, center); mul_m4_v3(vc.obedit->imat, center); if (f_reference->len == 3 && RNA_boolean_get(op->ptr, "create_quads")) { const float fac = line_point_factor_v3(center, e_act->v1->co, e_act->v2->co); @@ -366,7 +366,7 @@ static int edbm_polybuild_face_at_cursor_invoke(bContext *C, wmOperator *op, con BMFace *f_reference = e_pair[0]->l ? e_pair[0]->l->f : NULL; mul_v3_m4v3(center, vc.obedit->obmat, v_act->co); - ED_view3d_win_to_3d_int(vc.v3d, vc.ar, center, event->mval, center); + ED_view3d_win_to_3d_int(vc.v3d, vc.region, center, event->mval, center); mul_m4_v3(vc.obedit->imat, center); BMVert *v_quad[4]; @@ -388,7 +388,7 @@ static int edbm_polybuild_face_at_cursor_invoke(bContext *C, wmOperator *op, con else { /* Just add edge */ mul_m4_v3(vc.obedit->obmat, center); - ED_view3d_win_to_3d_int(vc.v3d, vc.ar, v_act->co, event->mval, center); + ED_view3d_win_to_3d_int(vc.v3d, vc.region, v_act->co, event->mval, center); mul_m4_v3(vc.obedit->imat, center); BMVert *v_new = BM_vert_create(bm, center, NULL, BM_CREATE_NOP); @@ -474,7 +474,7 @@ static int edbm_polybuild_split_at_cursor_invoke(bContext *C, BMEdge *e_act = (BMEdge *)ele_act; mid_v3_v3v3(center, e_act->v1->co, e_act->v2->co); mul_m4_v3(vc.obedit->obmat, center); - ED_view3d_win_to_3d_int(vc.v3d, vc.ar, center, event->mval, center); + ED_view3d_win_to_3d_int(vc.v3d, vc.region, center, event->mval, center); mul_m4_v3(vc.obedit->imat, center); const float fac = line_point_factor_v3(center, e_act->v1->co, e_act->v2->co); -- cgit v1.2.3