diff options
author | Julian Eisel <julian@blender.org> | 2020-04-03 14:25:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-03 14:34:50 +0300 |
commit | 905c0269f302e8e0e7a27dda8d5256fdcd06ce60 (patch) | |
tree | 1c720d4f0069879d5b4c0c9ea8db867106920d4f /source/blender/editors/space_graph/graph_utils.c | |
parent | 1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (diff) |
Cleanup: Rename ScrArea variables from sa to area
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
Diffstat (limited to 'source/blender/editors/space_graph/graph_utils.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_utils.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index 34c1958734d..575cba07f04 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -54,32 +54,32 @@ /* Set up UI configuration for Drivers Editor */ /* NOTE: Currently called from windowmanager * (new drivers editor window) and RNA (mode switching) */ -void ED_drivers_editor_init(bContext *C, ScrArea *sa) +void ED_drivers_editor_init(bContext *C, ScrArea *area) { - SpaceGraph *sipo = (SpaceGraph *)sa->spacedata.first; + SpaceGraph *sipo = (SpaceGraph *)area->spacedata.first; /* Set mode */ sipo->mode = SIPO_MODE_DRIVERS; /* Show Properties Region (or else the settings can't be edited) */ - ARegion *region_props = BKE_area_find_region_type(sa, RGN_TYPE_UI); + ARegion *region_props = BKE_area_find_region_type(area, RGN_TYPE_UI); if (region_props) { UI_panel_category_active_set(region_props, "Drivers"); region_props->flag &= ~RGN_FLAG_HIDDEN; /* XXX: Adjust width of this too? */ - ED_region_visibility_change_update(C, sa, region_props); + ED_region_visibility_change_update(C, area, region_props); } else { - printf("%s: Couldn't find properties region for Drivers Editor - %p\n", __func__, sa); + printf("%s: Couldn't find properties region for Drivers Editor - %p\n", __func__, area); } /* Adjust framing in graph region */ /* TODO: Have a way of not resetting this every time? * (e.g. So that switching back and forth between editors doesn't keep jumping?) */ - ARegion *region_main = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + ARegion *region_main = BKE_area_find_region_type(area, RGN_TYPE_WINDOW); if (region_main) { /* XXX: Ideally we recenter based on the range instead... */ region_main->v2d.tot.xmin = -2.0f; @@ -135,14 +135,14 @@ bool graphop_visible_keyframes_poll(bContext *C) bAnimContext ac; bAnimListElem *ale; ListBase anim_data = {NULL, NULL}; - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); size_t items; int filter; short found = 0; /* firstly, check if in Graph Editor */ // TODO: also check for region? - if ((sa == NULL) || (sa->spacetype != SPACE_GRAPH)) { + if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { return 0; } @@ -188,14 +188,14 @@ bool graphop_editable_keyframes_poll(bContext *C) bAnimContext ac; bAnimListElem *ale; ListBase anim_data = {NULL, NULL}; - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); size_t items; int filter; short found = 0; /* firstly, check if in Graph Editor */ // TODO: also check for region? - if ((sa == NULL) || (sa->spacetype != SPACE_GRAPH)) { + if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { return 0; } @@ -241,12 +241,12 @@ bool graphop_active_fcurve_poll(bContext *C) { bAnimContext ac; bAnimListElem *ale; - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); bool has_fcurve = 0; /* firstly, check if in Graph Editor */ // TODO: also check for region? - if ((sa == NULL) || (sa->spacetype != SPACE_GRAPH)) { + if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { return 0; } @@ -293,13 +293,13 @@ bool graphop_selected_fcurve_poll(bContext *C) { bAnimContext ac; ListBase anim_data = {NULL, NULL}; - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); size_t items; int filter; /* firstly, check if in Graph Editor */ // TODO: also check for region? - if ((sa == NULL) || (sa->spacetype != SPACE_GRAPH)) { + if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { return 0; } |