Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-03-06 18:56:42 +0300
committerJulian Eisel <julian@blender.org>2020-03-06 19:19:23 +0300
commitb2ee1770d4c31078518f4ec9edd5196a41345162 (patch)
tree6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/editors/interface/interface_eyedropper_depth.c
parentb825a95ec311a169d33fe21e28418f11a516c82f (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/interface/interface_eyedropper_depth.c')
-rw-r--r--source/blender/editors/interface/interface_eyedropper_depth.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_depth.c b/source/blender/editors/interface/interface_eyedropper_depth.c
index 8a48ca19db2..15a9d2d9f50 100644
--- a/source/blender/editors/interface/interface_eyedropper_depth.c
+++ b/source/blender/editors/interface/interface_eyedropper_depth.c
@@ -77,10 +77,10 @@ typedef struct DepthDropper {
char name[200];
} DepthDropper;
-static void depthdropper_draw_cb(const struct bContext *C, ARegion *ar, void *arg)
+static void depthdropper_draw_cb(const struct bContext *C, ARegion *region, void *arg)
{
DepthDropper *ddr = arg;
- eyedropper_draw_cursor_text(C, ar, ddr->name);
+ eyedropper_draw_cursor_text(C, region, ddr->name);
}
static int depthdropper_init(bContext *C, wmOperator *op)
@@ -166,30 +166,30 @@ static void depthdropper_depth_sample_pt(
if (sa) {
if (sa->spacetype == SPACE_VIEW3D) {
- ARegion *ar = BKE_area_find_region_xy(sa, RGN_TYPE_WINDOW, mx, my);
- if (ar) {
+ ARegion *region = BKE_area_find_region_xy(sa, RGN_TYPE_WINDOW, mx, my);
+ if (region) {
struct Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
View3D *v3d = sa->spacedata.first;
- RegionView3D *rv3d = ar->regiondata;
+ RegionView3D *rv3d = region->regiondata;
/* weak, we could pass in some reference point */
const float *view_co = v3d->camera ? v3d->camera->obmat[3] : rv3d->viewinv[3];
- const int mval[2] = {mx - ar->winrct.xmin, my - ar->winrct.ymin};
+ const int mval[2] = {mx - region->winrct.xmin, my - region->winrct.ymin};
float co[3];
CTX_wm_area_set(C, sa);
- CTX_wm_region_set(C, ar);
+ CTX_wm_region_set(C, region);
/* grr, always draw else we leave stale text */
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
view3d_operator_needs_opengl(C);
- if (ED_view3d_autodist(depsgraph, ar, v3d, mval, co, true, NULL)) {
- const float mval_center_fl[2] = {(float)ar->winx / 2, (float)ar->winy / 2};
+ if (ED_view3d_autodist(depsgraph, region, v3d, mval, co, true, NULL)) {
+ const float mval_center_fl[2] = {(float)region->winx / 2, (float)region->winy / 2};
float co_align[3];
/* quick way to get view-center aligned point */
- ED_view3d_win_to_3d(v3d, ar, co, mval_center_fl, co_align);
+ ED_view3d_win_to_3d(v3d, region, co, mval_center_fl, co_align);
*r_depth = len_v3v3(view_co, co_align);