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/blenkernel/intern/context.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/blenkernel/intern/context.c')
-rw-r--r--source/blender/blenkernel/intern/context.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index e3d95bb660f..48985932d87 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -280,7 +280,7 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res
{
bScreen *sc;
ScrArea *sa;
- ARegion *ar;
+ ARegion *region;
int done = 0, recursion = C->data.recursion;
int ret = 0;
@@ -318,10 +318,10 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res
done = 1;
}
}
- if (done != 1 && recursion < 2 && (ar = CTX_wm_region(C))) {
+ if (done != 1 && recursion < 2 && (region = CTX_wm_region(C))) {
C->data.recursion = 2;
- if (ar->type && ar->type->context) {
- ret = ar->type->context(C, member, result);
+ if (region->type && region->type->context) {
+ ret = region->type->context(C, member, result);
if (ret) {
done = -(-ret | -done);
}
@@ -545,7 +545,7 @@ ListBase CTX_data_dir_get_ex(const bContext *C,
ListBase lb;
bScreen *sc;
ScrArea *sa;
- ARegion *ar;
+ ARegion *region;
int a;
memset(&lb, 0, sizeof(lb));
@@ -578,9 +578,9 @@ ListBase CTX_data_dir_get_ex(const bContext *C,
data_dir_add(&lb, entry->name, use_all);
}
}
- if ((ar = CTX_wm_region(C)) && ar->type && ar->type->context) {
+ if ((region = CTX_wm_region(C)) && region->type && region->type->context) {
memset(&result, 0, sizeof(result));
- ar->type->context(C, "", &result);
+ region->type->context(C, "", &result);
if (result.dir) {
for (a = 0; result.dir[a]; a++) {
@@ -727,8 +727,8 @@ ARegion *CTX_wm_region(const bContext *C)
void *CTX_wm_region_data(const bContext *C)
{
- ARegion *ar = CTX_wm_region(C);
- return (ar) ? ar->regiondata : NULL;
+ ARegion *region = CTX_wm_region(C);
+ return (region) ? region->regiondata : NULL;
}
struct ARegion *CTX_wm_menu(const bContext *C)
@@ -767,11 +767,11 @@ View3D *CTX_wm_view3d(const bContext *C)
RegionView3D *CTX_wm_region_view3d(const bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
- ARegion *ar = CTX_wm_region(C);
+ ARegion *region = CTX_wm_region(C);
if (sa && sa->spacetype == SPACE_VIEW3D) {
- if (ar && ar->regiontype == RGN_TYPE_WINDOW) {
- return ar->regiondata;
+ if (region && region->regiontype == RGN_TYPE_WINDOW) {
+ return region->regiondata;
}
}
return NULL;