[Bf-blender-cvs] [10c2254d412] master: Cleanup: Continue renaming ARegion variables from ar to region
Julian Eisel
noreply at git.blender.org
Fri Apr 3 12:59:25 CEST 2020
Commit: 10c2254d412d7cbee0b0d9f8b7c74a9d3ce69b69
Author: Julian Eisel
Date: Fri Apr 3 12:51:03 2020 +0200
Branches: master
https://developer.blender.org/rB10c2254d412d7cbee0b0d9f8b7c74a9d3ce69b69
Cleanup: Continue renaming ARegion variables from ar to region
Continuation of b2ee1770d4c3, now non-single word variables are also
renamed.
Part of T74432.
Also ran clang-format on affected files.
===================================================================
M source/blender/blenkernel/intern/screen.c
M source/blender/blenloader/intern/versioning_250.c
M source/blender/blenloader/intern/versioning_280.c
M source/blender/editors/include/ED_screen.h
M source/blender/editors/include/ED_view3d.h
M source/blender/editors/interface/interface_eyedropper_datablock.c
M source/blender/editors/interface/interface_eyedropper_depth.c
M source/blender/editors/interface/interface_handlers.c
M source/blender/editors/interface/interface_ops.c
M source/blender/editors/interface/interface_region_hud.c
M source/blender/editors/interface/interface_region_popup.c
M source/blender/editors/screen/area.c
M source/blender/editors/screen/area_query.c
M source/blender/editors/screen/screen_edit.c
M source/blender/editors/screen/screen_ops.c
M source/blender/editors/sculpt_paint/sculpt.c
M source/blender/editors/space_clip/space_clip.c
M source/blender/editors/space_file/file_ops.c
M source/blender/editors/space_file/space_file.c
M source/blender/editors/space_graph/graph_utils.c
M source/blender/editors/space_sequencer/space_sequencer.c
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/editors/space_view3d/view3d_edit.c
M source/blender/editors/space_view3d/view3d_utils.c
M source/blender/editors/space_view3d/view3d_view.c
M source/blender/editors/undo/ed_undo.c
M source/blender/makesrna/intern/rna_space.c
M source/blender/windowmanager/intern/wm_draw.c
M source/blender/windowmanager/intern/wm_event_system.c
M source/blender/windowmanager/intern/wm_operators.c
M source/blender/windowmanager/intern/wm_splash_screen.c
M source/blender/windowmanager/intern/wm_toolsystem.c
M source/blender/windowmanager/intern/wm_tooltip.c
===================================================================
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index dbf460fdea2..6c888e7b19e 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -748,19 +748,19 @@ ARegion *BKE_area_find_region_active_win(ScrArea *sa)
ARegion *BKE_area_find_region_xy(ScrArea *sa, const int regiontype, int x, int y)
{
- ARegion *ar_found = NULL;
+ ARegion *region_found = NULL;
if (sa) {
ARegion *region;
for (region = sa->regionbase.first; region; region = region->next) {
if ((regiontype == RGN_TYPE_ANY) || (region->regiontype == regiontype)) {
if (BLI_rcti_isect_pt(®ion->winrct, x, y)) {
- ar_found = region;
+ region_found = region;
break;
}
}
}
}
- return ar_found;
+ return region_found;
}
/**
@@ -768,16 +768,16 @@ ARegion *BKE_area_find_region_xy(ScrArea *sa, const int regiontype, int x, int y
*/
ARegion *BKE_screen_find_region_xy(bScreen *sc, const int regiontype, int x, int y)
{
- ARegion *ar_found = NULL;
+ ARegion *region_found = NULL;
for (ARegion *region = sc->regionbase.first; region; region = region->next) {
if ((regiontype == RGN_TYPE_ANY) || (region->regiontype == regiontype)) {
if (BLI_rcti_isect_pt(®ion->winrct, x, y)) {
- ar_found = region;
+ region_found = region;
break;
}
}
}
- return ar_found;
+ return region_found;
}
/**
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index bb80aaaaa5a..68e654a8cd5 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -136,7 +136,7 @@ static void sequencer_init_preview_region(ARegion *region)
static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
{
ARegion *region;
- ARegion *ar_main;
+ ARegion *region_main;
if (sl) {
/* first channels for ipo action nla... */
@@ -205,14 +205,14 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
region->alignment = RGN_ALIGN_TOP;
break;
case SPACE_SEQ:
- ar_main = (ARegion *)lb->first;
- for (; ar_main; ar_main = ar_main->next) {
- if (ar_main->regiontype == RGN_TYPE_WINDOW) {
+ region_main = (ARegion *)lb->first;
+ for (; region_main; region_main = region_main->next) {
+ if (region_main->regiontype == RGN_TYPE_WINDOW) {
break;
}
}
region = MEM_callocN(sizeof(ARegion), "preview area for sequencer");
- BLI_insertlinkbefore(lb, ar_main, region);
+ BLI_insertlinkbefore(lb, region_main, region);
sequencer_init_preview_region(region);
break;
case SPACE_VIEW3D:
@@ -1235,7 +1235,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
for (sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_SEQ) {
ARegion *region;
- ARegion *ar_main;
+ ARegion *region_main;
ListBase *regionbase;
SpaceSeq *sseq = (SpaceSeq *)sl;
@@ -1253,14 +1253,14 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
sseq->mainb = SEQ_DRAW_IMG_IMBUF;
}
- ar_main = (ARegion *)regionbase->first;
- for (; ar_main; ar_main = ar_main->next) {
- if (ar_main->regiontype == RGN_TYPE_WINDOW) {
+ region_main = (ARegion *)regionbase->first;
+ for (; region_main; region_main = region_main->next) {
+ if (region_main->regiontype == RGN_TYPE_WINDOW) {
break;
}
}
region = MEM_callocN(sizeof(ARegion), "preview area for sequencer");
- BLI_insertlinkbefore(regionbase, ar_main, region);
+ BLI_insertlinkbefore(regionbase, region_main, region);
sequencer_init_preview_region(region);
}
}
@@ -1433,7 +1433,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
for (sa = screen->areabase.first; sa; sa = sa->next) {
for (sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_SEQ) {
- ARegion *ar_preview;
+ ARegion *region_preview;
ListBase *regionbase;
if (sl == sa->spacedata.first) {
@@ -1443,14 +1443,14 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
regionbase = &sl->regionbase;
}
- ar_preview = (ARegion *)regionbase->first;
- for (; ar_preview; ar_preview = ar_preview->next) {
- if (ar_preview->regiontype == RGN_TYPE_PREVIEW) {
+ region_preview = (ARegion *)regionbase->first;
+ for (; region_preview; region_preview = region_preview->next) {
+ if (region_preview->regiontype == RGN_TYPE_PREVIEW) {
break;
}
}
- if (ar_preview && (ar_preview->regiontype == RGN_TYPE_PREVIEW)) {
- sequencer_init_preview_region(ar_preview);
+ if (region_preview && (region_preview->regiontype == RGN_TYPE_PREVIEW)) {
+ sequencer_init_preview_region(region_preview);
}
}
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index b3c0473e173..ac0c0c3da39 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -609,9 +609,9 @@ static void do_versions_remove_region(ListBase *regionbase, ARegion *region)
static void do_versions_remove_regions_by_type(ListBase *regionbase, int regiontype)
{
- ARegion *region, *ar_next;
- for (region = regionbase->first; region; region = ar_next) {
- ar_next = region->next;
+ ARegion *region, *region_next;
+ for (region = regionbase->first; region; region = region_next) {
+ region_next = region->next;
if (region->regiontype == regiontype) {
do_versions_remove_region(regionbase, region);
}
@@ -2934,9 +2934,9 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
- ARegion *ar_header = do_versions_find_region_or_null(regionbase, RGN_TYPE_HEADER);
+ ARegion *region_header = do_versions_find_region_or_null(regionbase, RGN_TYPE_HEADER);
- if (!ar_header) {
+ if (!region_header) {
/* Headers should always be first in the region list, except if there's also a
* tool-header. These were only introduced in later versions though, so should be
* fine to always insert headers first. */
@@ -2959,16 +2959,17 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (sl->spacetype == SPACE_PROPERTIES) {
ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
ARegion *region = MEM_callocN(sizeof(ARegion), "navigation bar for properties");
- ARegion *ar_header = NULL;
+ ARegion *region_header = NULL;
- for (ar_header = regionbase->first; ar_header; ar_header = ar_header->next) {
- if (ar_header->regiontype == RGN_TYPE_HEADER) {
+ for (region_header = regionbase->first; region_header;
+ region_header = region_header->next) {
+ if (region_header->regiontype == RGN_TYPE_HEADER) {
break;
}
}
- BLI_assert(ar_header);
+ BLI_assert(region_header);
- BLI_insertlinkafter(regionbase, ar_header, region);
+ BLI_insertlinkafter(regionbase, region_header, region);
region->regiontype = RGN_TYPE_NAV_BAR;
region->alignment = RGN_ALIGN_LEFT;
@@ -3468,13 +3469,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (!execute_region) {
ListBase *regionbase = (sl == area->spacedata.first) ? &area->regionbase :
&sl->regionbase;
- ARegion *ar_navbar = BKE_spacedata_find_region_type(sl, area, RGN_TYPE_NAV_BAR);
+ ARegion *region_navbar = BKE_spacedata_find_region_type(sl, area, RGN_TYPE_NAV_BAR);
execute_region = MEM_callocN(sizeof(ARegion), "execute region for properties");
- BLI_assert(ar_navbar);
+ BLI_assert(region_navbar);
- BLI_insertlinkafter(regionbase, ar_navbar, execute_region);
+ BLI_insertlinkafter(regionbase, region_navbar, execute_region);
execute_region->regiontype = RGN_TYPE_EXECUTE;
execute_region->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
@@ -3711,8 +3712,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
ARegion *region = do_versions_add_region(RGN_TYPE_FOOTER, "footer for text");
region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP : RGN_ALIGN_BOTTOM;
- ARegion *ar_header = do_versions_find_region(regionbase, RGN_TYPE_HEADER);
- BLI_insertlinkafter(regionbase, ar_header, region);
+ ARegion *region_header = do_versions_find_region(regionbase, RGN_TYPE_HEADER);
+ BLI_insertlinkafter(regionbase, region_header, region);
}
}
}
@@ -3804,8 +3805,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
region = do_versions_add_region(RGN_TYPE_TOOL_HEADER, "tool header");
region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_AL
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list