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/animation/anim_channels_edit.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/animation/anim_channels_edit.c')
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index f47ed85f5bf..28f80994c4d 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -695,15 +695,15 @@ bool ANIM_remove_empty_action_from_animdata(struct AnimData *adt) /* poll callback for being in an Animation Editor channels list region */ static bool animedit_poll_channels_active(bContext *C) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); /* channels region test */ /* TODO: could enhance with actually testing if channels region? */ - if (ELEM(NULL, sa, CTX_wm_region(C))) { + if (ELEM(NULL, area, CTX_wm_region(C))) { return 0; } /* animation editor test */ - if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA) == 0) { + if (ELEM(area->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA) == 0) { return 0; } @@ -713,21 +713,21 @@ static bool animedit_poll_channels_active(bContext *C) /* poll callback for Animation Editor channels list region + not in NLA-tweakmode for NLA */ static bool animedit_poll_channels_nla_tweakmode_off(bContext *C) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); Scene *scene = CTX_data_scene(C); /* channels region test */ /* TODO: could enhance with actually testing if channels region? */ - if (ELEM(NULL, sa, CTX_wm_region(C))) { + if (ELEM(NULL, area, CTX_wm_region(C))) { return 0; } /* animation editor test */ - if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA) == 0) { + if (ELEM(area->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA) == 0) { return 0; } /* NLA TweakMode test */ - if (sa->spacetype == SPACE_NLA) { + if (area->spacetype == SPACE_NLA) { if ((scene == NULL) || (scene->flag & SCE_NLA_EDIT_ON)) { return 0; } @@ -1518,19 +1518,19 @@ static void ANIM_OT_channels_move(wmOperatorType *ot) static bool animchannels_grouping_poll(bContext *C) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); SpaceLink *sl; /* channels region test */ /* TODO: could enhance with actually testing if channels region? */ - if (ELEM(NULL, sa, CTX_wm_region(C))) { + if (ELEM(NULL, area, CTX_wm_region(C))) { return 0; } /* animation editor test - must be suitable modes only */ sl = CTX_wm_space_data(C); - switch (sa->spacetype) { + switch (area->spacetype) { /* supported... */ case SPACE_ACTION: { SpaceAction *saction = (SpaceAction *)sl; @@ -2353,16 +2353,16 @@ static void ANIM_OT_channels_clean_empty(wmOperatorType *ot) static bool animchannels_enable_poll(bContext *C) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); /* channels region test */ /* TODO: could enhance with actually testing if channels region? */ - if (ELEM(NULL, sa, CTX_wm_region(C))) { + if (ELEM(NULL, area, CTX_wm_region(C))) { return 0; } /* animation editor test - Action/Dopesheet/etc. and Graph only */ - if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_GRAPH) == 0) { + if (ELEM(area->spacetype, SPACE_ACTION, SPACE_GRAPH) == 0) { return 0; } @@ -2431,14 +2431,14 @@ static void ANIM_OT_channels_fcurves_enable(wmOperatorType *ot) /* XXX: make this generic? */ static bool animchannels_find_poll(bContext *C) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); - if (sa == NULL) { + if (area == NULL) { return 0; } /* animation editor with dopesheet */ - return ELEM(sa->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA); + return ELEM(area->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA); } /* find_invoke() - Get initial channels */ |