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/transform/transform_input.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/transform/transform_input.c')
-rw-r--r-- | source/blender/editors/transform/transform_input.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 8dc403c45d2..fb929b60739 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -93,7 +93,7 @@ static void InputHorizontalRatio(TransInfo *t, const double mval[2], float output[3]) { - const int winx = t->ar ? t->ar->winx : 1; + const int winx = t->region ? t->region->winx : 1; output[0] = ((mval[0] - mi->imval[0]) / winx) * 2.0f; } @@ -113,7 +113,7 @@ static void InputHorizontalAbsolute(TransInfo *t, static void InputVerticalRatio(TransInfo *t, MouseInput *mi, const double mval[2], float output[3]) { - const int winy = t->ar ? t->ar->winy : 1; + const int winy = t->region ? t->region->winy : 1; /* Flip so dragging up increases (matching viewport zoom). */ output[0] = ((mval[1] - mi->imval[1]) / winy) * -2.0f; @@ -153,10 +153,10 @@ void setCustomPoints(TransInfo *UNUSED(t), void setCustomPointsFromDirection(TransInfo *t, MouseInput *mi, const float dir[2]) { BLI_ASSERT_UNIT_V2(dir); - const int win_axis = t->ar ? - ((abs((int)(t->ar->winx * dir[0])) + abs((int)(t->ar->winy * dir[1]))) / - 2) : - 1; + const int win_axis = t->region ? ((abs((int)(t->region->winx * dir[0])) + + abs((int)(t->region->winy * dir[1]))) / + 2) : + 1; const int mval_start[2] = { mi->imval[0] + dir[0] * win_axis, mi->imval[1] + dir[1] * win_axis, |