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/space_graph/graph_edit.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/space_graph/graph_edit.c')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 623d7e287d2..7580666c5f0 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -297,9 +297,9 @@ static int graphkeys_viewall(bContext *C,
float pad_top = UI_TIME_SCRUB_MARGIN_Y;
float pad_bottom = BLI_listbase_is_empty(ED_context_get_markers(C)) ? V2D_SCROLL_HANDLE_HEIGHT :
UI_MARKER_MARGIN_Y;
- BLI_rctf_pad_y(&cur_new, ac.ar->winy, pad_bottom, pad_top);
+ BLI_rctf_pad_y(&cur_new, ac.region->winy, pad_bottom, pad_top);
- UI_view2d_smooth_view(C, ac.ar, &cur_new, smooth_viewtx);
+ UI_view2d_smooth_view(C, ac.region, &cur_new, smooth_viewtx);
return OPERATOR_FINISHED;
}
@@ -486,7 +486,7 @@ static int graphkeys_create_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)
/* Ghost curves are snapshots of the visible portions of the curves,
* so set range to be the visible range. */
- v2d = &ac.ar->v2d;
+ v2d = &ac.region->v2d;
start = (int)v2d->cur.xmin;
end = (int)v2d->cur.xmax;
@@ -871,7 +871,7 @@ static int graphkeys_click_insert_exec(bContext *C, wmOperator *op)
static int graphkeys_click_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
bAnimContext ac;
- ARegion *ar;
+ ARegion *region;
View2D *v2d;
int mval[2];
float x, y;
@@ -882,11 +882,11 @@ static int graphkeys_click_insert_invoke(bContext *C, wmOperator *op, const wmEv
}
/* store mouse coordinates in View2D space, into the operator's properties */
- ar = ac.ar;
- v2d = &ar->v2d;
+ region = ac.region;
+ v2d = &region->v2d;
- mval[0] = (event->x - ar->winrct.xmin);
- mval[1] = (event->y - ar->winrct.ymin);
+ mval[0] = (event->x - region->winrct.xmin);
+ mval[1] = (event->y - region->winrct.ymin);
UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y);
@@ -1337,7 +1337,7 @@ typedef struct tDecimateGraphOp {
bAnimContext ac;
Scene *scene;
ScrArea *sa;
- ARegion *ar;
+ ARegion *region;
/** A 0-1 value for determining how much we should decimate. */
PropertyRNA *percentage_prop;
@@ -1460,7 +1460,7 @@ static void decimate_mouse_update_percentage(tDecimateGraphOp *dgo,
wmOperator *op,
const wmEvent *event)
{
- float percentage = (event->x - dgo->ar->winrct.xmin) / ((float)dgo->ar->winx);
+ float percentage = (event->x - dgo->region->winrct.xmin) / ((float)dgo->region->winx);
RNA_property_float_set(op->ptr, dgo->percentage_prop, percentage);
}
@@ -1483,7 +1483,7 @@ static int graphkeys_decimate_invoke(bContext *C, wmOperator *op, const wmEvent
dgo->scene = CTX_data_scene(C);
dgo->sa = CTX_wm_area(C);
- dgo->ar = CTX_wm_region(C);
+ dgo->region = CTX_wm_region(C);
/* initialise percentage so that it will have the correct value before the first mouse move. */
decimate_mouse_update_percentage(dgo, op, event);