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/sculpt_paint/paint_vertex_weight_ops.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/sculpt_paint/paint_vertex_weight_ops.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
index 0d4fcd3e87d..4b8990c1b5d 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
@@ -318,8 +318,8 @@ static const EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C,
uint index;
const int mval[2] = {
- win->eventstate->x - vc.ar->winrct.xmin,
- win->eventstate->y - vc.ar->winrct.ymin,
+ win->eventstate->x - vc.region->winrct.xmin,
+ win->eventstate->y - vc.region->winrct.ymin,
};
view3d_operator_needs_opengl(C);
@@ -563,7 +563,7 @@ typedef struct WPGradient_vertStoreBase {
} WPGradient_vertStoreBase;
typedef struct WPGradient_userData {
- struct ARegion *ar;
+ struct ARegion *region;
Scene *scene;
Mesh *me;
Brush *brush;
@@ -671,7 +671,7 @@ static void gradientVertInit__mapFunc(void *userData,
}
if (ED_view3d_project_float_object(
- grad_data->ar, co, vs->sco, V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) !=
+ grad_data->region, co, vs->sco, V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) !=
V3D_PROJ_RET_OK) {
copy_v2_fl(vs->sco, FLT_MAX);
return;
@@ -733,7 +733,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op)
{
wmGesture *gesture = op->customdata;
WPGradient_vertStoreBase *vert_cache;
- struct ARegion *ar = CTX_wm_region(C);
+ struct ARegion *region = CTX_wm_region(C);
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
Mesh *me = ob->data;
@@ -778,7 +778,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op)
sizeof(WPGradient_vertStoreBase) + (sizeof(WPGradient_vertStore) * me->totvert), __func__);
}
- data.ar = ar;
+ data.region = region;
data.scene = scene;
data.me = ob->data;
data.sco_start = sco_start;
@@ -801,7 +801,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op)
data.weightpaint = BKE_brush_weight_get(scene, brush);
}
- ED_view3d_init_mats_rv3d(ob, ar->regiondata);
+ ED_view3d_init_mats_rv3d(ob, region->regiondata);
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
@@ -843,8 +843,8 @@ static int paint_weight_gradient_invoke(bContext *C, wmOperator *op, const wmEve
ret = WM_gesture_straightline_invoke(C, op, event);
if (ret & OPERATOR_RUNNING_MODAL) {
- struct ARegion *ar = CTX_wm_region(C);
- if (ar->regiontype == RGN_TYPE_WINDOW) {
+ struct ARegion *region = CTX_wm_region(C);
+ if (region->regiontype == RGN_TYPE_WINDOW) {
/* TODO, hardcoded, extend WM_gesture_straightline_ */
if (event->type == LEFTMOUSE && event->val == KM_PRESS) {
wmGesture *gesture = op->customdata;