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/space_outliner/outliner_utils.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/space_outliner/outliner_utils.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_utils.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c index c3984ab16fa..a12defac813 100644 --- a/source/blender/editors/space_outliner/outliner_utils.c +++ b/source/blender/editors/space_outliner/outliner_utils.c @@ -409,38 +409,38 @@ bool outliner_item_is_co_within_close_toggle(const TreeElement *te, float view_c } /* Scroll view vertically while keeping within total bounds */ -void outliner_scroll_view(ARegion *ar, int delta_y) +void outliner_scroll_view(ARegion *region, int delta_y) { - int y_min = MIN2(ar->v2d.cur.ymin, ar->v2d.tot.ymin); + int y_min = MIN2(region->v2d.cur.ymin, region->v2d.tot.ymin); - ar->v2d.cur.ymax += delta_y; - ar->v2d.cur.ymin += delta_y; + region->v2d.cur.ymax += delta_y; + region->v2d.cur.ymin += delta_y; /* Adjust view if delta placed view outside total area */ int offset; - if (ar->v2d.cur.ymax > -UI_UNIT_Y) { - offset = ar->v2d.cur.ymax; - ar->v2d.cur.ymax -= offset; - ar->v2d.cur.ymin -= offset; + if (region->v2d.cur.ymax > -UI_UNIT_Y) { + offset = region->v2d.cur.ymax; + region->v2d.cur.ymax -= offset; + region->v2d.cur.ymin -= offset; } - else if (ar->v2d.cur.ymin < y_min) { - offset = y_min - ar->v2d.cur.ymin; - ar->v2d.cur.ymax += offset; - ar->v2d.cur.ymin += offset; + else if (region->v2d.cur.ymin < y_min) { + offset = y_min - region->v2d.cur.ymin; + region->v2d.cur.ymax += offset; + region->v2d.cur.ymin += offset; } } /* Get base of object under cursor. Used for eyedropper tool */ Base *ED_outliner_give_base_under_cursor(bContext *C, const int mval[2]) { - ARegion *ar = CTX_wm_region(C); + ARegion *region = CTX_wm_region(C); ViewLayer *view_layer = CTX_data_view_layer(C); SpaceOutliner *soops = CTX_wm_space_outliner(C); TreeElement *te; Base *base = NULL; float view_mval[2]; - UI_view2d_region_to_view(&ar->v2d, mval[0], mval[1], &view_mval[0], &view_mval[1]); + UI_view2d_region_to_view(®ion->v2d, mval[0], mval[1], &view_mval[0], &view_mval[1]); te = outliner_find_item_at_y(soops, &soops->tree, view_mval[1]); if (te) { |