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/makesrna/intern/rna_space_api.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/makesrna/intern/rna_space_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space_api.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_space_api.c b/source/blender/makesrna/intern/rna_space_api.c index cbaa407646f..84c80e56d0d 100644 --- a/source/blender/makesrna/intern/rna_space_api.c +++ b/source/blender/makesrna/intern/rna_space_api.c @@ -35,11 +35,11 @@ static void rna_RegionView3D_update(ID *id, RegionView3D *rv3d, bContext *C) bScreen *sc = (bScreen *)id; ScrArea *sa; - ARegion *ar; + ARegion *region; - area_region_from_regiondata(sc, rv3d, &sa, &ar); + area_region_from_regiondata(sc, rv3d, &sa, ®ion); - if (sa && ar && sa->spacetype == SPACE_VIEW3D) { + if (sa && region && sa->spacetype == SPACE_VIEW3D) { Main *bmain = CTX_data_main(C); View3D *v3d = sa->spacedata.first; wmWindowManager *wm = CTX_wm_manager(C); @@ -51,7 +51,7 @@ static void rna_RegionView3D_update(ID *id, RegionView3D *rv3d, bContext *C) ViewLayer *view_layer = WM_window_get_active_view_layer(win); Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true); - ED_view3d_update_viewmat(depsgraph, scene, v3d, ar, NULL, NULL, NULL, false); + ED_view3d_update_viewmat(depsgraph, scene, v3d, region, NULL, NULL, NULL, false); break; } } @@ -64,9 +64,9 @@ static void rna_SpaceTextEditor_region_location_from_cursor( bScreen *sc = (bScreen *)id; ScrArea *sa = BKE_screen_find_area_from_space(sc, (SpaceLink *)st); if (sa) { - ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + ARegion *region = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); const int cursor_co[2] = {line, column}; - ED_text_region_location_from_cursor(st, ar, cursor_co, r_pixel_pos); + ED_text_region_location_from_cursor(st, region, cursor_co, r_pixel_pos); } } |