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/draw/intern/draw_select_buffer.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/draw/intern/draw_select_buffer.c')
-rw-r--r--source/blender/draw/intern/draw_select_buffer.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/draw/intern/draw_select_buffer.c b/source/blender/draw/intern/draw_select_buffer.c
index 6454fc71e56..81c9f400f6e 100644
--- a/source/blender/draw/intern/draw_select_buffer.c
+++ b/source/blender/draw/intern/draw_select_buffer.c
@@ -48,7 +48,7 @@
/* Main function to read a block of pixels from the select frame buffer. */
uint *DRW_select_buffer_read(struct Depsgraph *depsgraph,
- struct ARegion *ar,
+ struct ARegion *region,
struct View3D *v3d,
const rcti *rect,
uint *r_buf_len)
@@ -59,9 +59,9 @@ uint *DRW_select_buffer_read(struct Depsgraph *depsgraph,
/* Clamp rect. */
rcti r = {
.xmin = 0,
- .xmax = ar->winx,
+ .xmax = region->winx,
.ymin = 0,
- .ymax = ar->winy,
+ .ymax = region->winy,
};
/* Make sure that the rect is within the bounds of the viewport.
@@ -72,11 +72,11 @@ uint *DRW_select_buffer_read(struct Depsgraph *depsgraph,
DRW_opengl_context_enable();
/* Update the drawing. */
- DRW_draw_select_id(depsgraph, ar, v3d, rect);
+ DRW_draw_select_id(depsgraph, region, v3d, rect);
if (select_ctx->index_drawn_len > 1) {
- BLI_assert(ar->winx == GPU_texture_width(DRW_engine_select_texture_get()) &&
- ar->winy == GPU_texture_height(DRW_engine_select_texture_get()));
+ BLI_assert(region->winx == GPU_texture_width(DRW_engine_select_texture_get()) &&
+ region->winy == GPU_texture_height(DRW_engine_select_texture_get()));
/* Read the UI32 pixels. */
buf_len = BLI_rcti_size_x(rect) * BLI_rcti_size_y(rect);
@@ -126,7 +126,7 @@ uint *DRW_select_buffer_read(struct Depsgraph *depsgraph,
* \returns a #BLI_bitmap the length of \a bitmap_len or NULL on failure.
*/
uint *DRW_select_buffer_bitmap_from_rect(struct Depsgraph *depsgraph,
- struct ARegion *ar,
+ struct ARegion *region,
struct View3D *v3d,
const rcti *rect,
uint *r_bitmap_len)
@@ -138,7 +138,7 @@ uint *DRW_select_buffer_bitmap_from_rect(struct Depsgraph *depsgraph,
rect_px.ymax += 1;
uint buf_len;
- uint *buf = DRW_select_buffer_read(depsgraph, ar, v3d, &rect_px, &buf_len);
+ uint *buf = DRW_select_buffer_read(depsgraph, region, v3d, &rect_px, &buf_len);
if (buf == NULL) {
return NULL;
}
@@ -171,7 +171,7 @@ uint *DRW_select_buffer_bitmap_from_rect(struct Depsgraph *depsgraph,
* \returns a #BLI_bitmap the length of \a bitmap_len or NULL on failure.
*/
uint *DRW_select_buffer_bitmap_from_circle(struct Depsgraph *depsgraph,
- struct ARegion *ar,
+ struct ARegion *region,
struct View3D *v3d,
const int center[2],
const int radius,
@@ -186,7 +186,7 @@ uint *DRW_select_buffer_bitmap_from_circle(struct Depsgraph *depsgraph,
.ymax = center[1] + radius + 1,
};
- const uint *buf = DRW_select_buffer_read(depsgraph, ar, v3d, &rect, NULL);
+ const uint *buf = DRW_select_buffer_read(depsgraph, region, v3d, &rect, NULL);
if (buf == NULL) {
return NULL;
@@ -241,7 +241,7 @@ static void drw_select_mask_px_cb(int x, int x_end, int y, void *user_data)
* \returns a #BLI_bitmap.
*/
uint *DRW_select_buffer_bitmap_from_poly(struct Depsgraph *depsgraph,
- struct ARegion *ar,
+ struct ARegion *region,
struct View3D *v3d,
const int poly[][2],
const int poly_len,
@@ -255,7 +255,7 @@ uint *DRW_select_buffer_bitmap_from_poly(struct Depsgraph *depsgraph,
rect_px.ymax += 1;
uint buf_len;
- uint *buf = DRW_select_buffer_read(depsgraph, ar, v3d, &rect_px, &buf_len);
+ uint *buf = DRW_select_buffer_read(depsgraph, region, v3d, &rect_px, &buf_len);
if (buf == NULL) {
return NULL;
}
@@ -312,7 +312,7 @@ uint *DRW_select_buffer_bitmap_from_poly(struct Depsgraph *depsgraph,
* Samples a single pixel.
*/
uint DRW_select_buffer_sample_point(struct Depsgraph *depsgraph,
- struct ARegion *ar,
+ struct ARegion *region,
struct View3D *v3d,
const int center[2])
{
@@ -326,7 +326,7 @@ uint DRW_select_buffer_sample_point(struct Depsgraph *depsgraph,
};
uint buf_len;
- uint *buf = DRW_select_buffer_read(depsgraph, ar, v3d, &rect, &buf_len);
+ uint *buf = DRW_select_buffer_read(depsgraph, region, v3d, &rect, &buf_len);
if (buf) {
BLI_assert(0 != buf_len);
ret = buf[0];
@@ -342,7 +342,7 @@ uint DRW_select_buffer_sample_point(struct Depsgraph *depsgraph,
* when found, this value is set to the distance of the selection that's returned.
*/
uint DRW_select_buffer_find_nearest_to_point(struct Depsgraph *depsgraph,
- struct ARegion *ar,
+ struct ARegion *region,
struct View3D *v3d,
const int center[2],
const uint id_min,
@@ -369,7 +369,7 @@ uint DRW_select_buffer_find_nearest_to_point(struct Depsgraph *depsgraph,
/* Read from selection framebuffer. */
uint buf_len;
- const uint *buf = DRW_select_buffer_read(depsgraph, ar, v3d, &rect, &buf_len);
+ const uint *buf = DRW_select_buffer_read(depsgraph, region, v3d, &rect, &buf_len);
if (buf == NULL) {
return index;