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-04-03 14:25:03 +0300
committerJulian Eisel <julian@blender.org>2020-04-03 14:34:50 +0300
commit905c0269f302e8e0e7a27dda8d5256fdcd06ce60 (patch)
tree1c720d4f0069879d5b4c0c9ea8db867106920d4f /source/blender/editors/space_nla/nla_edit.c
parent1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (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_nla/nla_edit.c')
-rw-r--r--source/blender/editors/space_nla/nla_edit.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 2427001657a..5b949911158 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -1506,7 +1506,7 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op)
NlaTrack *nlt = (NlaTrack *)ale->data;
NlaStrip *strip, *stripN = NULL;
- NlaStrip *sa = NULL, *sb = NULL;
+ NlaStrip *area = NULL, *sb = NULL;
/* make temporary metastrips so that entire islands of selections can be moved around */
BKE_nlastrips_make_metas(&nlt->strips, 1);
@@ -1533,9 +1533,9 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op)
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* first or second strip? */
- if (sa == NULL) {
+ if (area == NULL) {
/* store as first */
- sa = strip;
+ area = strip;
}
else if (sb == NULL) {
/* store as second */
@@ -1556,7 +1556,7 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op)
"Too many clusters of strips selected in NLA Track (%s): needs exactly 2 to be selected",
nlt->name);
}
- else if (sa == NULL) {
+ else if (area == NULL) {
/* no warning as this is just a common case,
* and it may get annoying when doing multiple tracks */
}
@@ -1573,24 +1573,24 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op)
/* remove these strips from the track,
* so that we can test if they can fit in the proposed places */
- BLI_remlink(&nlt->strips, sa);
+ BLI_remlink(&nlt->strips, area);
BLI_remlink(&nlt->strips, sb);
/* calculate new extents for strips */
/* a --> b */
nsa[0] = sb->start;
- nsa[1] = sb->start + (sa->end - sa->start);
+ nsa[1] = sb->start + (area->end - area->start);
/* b --> a */
- nsb[0] = sa->start;
- nsb[1] = sa->start + (sb->end - sb->start);
+ nsb[0] = area->start;
+ nsb[1] = area->start + (sb->end - sb->start);
/* check if the track has room for the strips to be swapped */
if (BKE_nlastrips_has_space(&nlt->strips, nsa[0], nsa[1]) &&
BKE_nlastrips_has_space(&nlt->strips, nsb[0], nsb[1])) {
/* set new extents for strips then */
- sa->start = nsa[0];
- sa->end = nsa[1];
- BKE_nlameta_flush_transforms(sa);
+ area->start = nsa[0];
+ area->end = nsa[1];
+ BKE_nlameta_flush_transforms(area);
sb->start = nsb[0];
sb->end = nsb[1];
@@ -1598,7 +1598,7 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op)
}
else {
/* not enough room to swap, so show message */
- if ((sa->flag & NLASTRIP_FLAG_TEMP_META) || (sb->flag & NLASTRIP_FLAG_TEMP_META)) {
+ if ((area->flag & NLASTRIP_FLAG_TEMP_META) || (sb->flag & NLASTRIP_FLAG_TEMP_META)) {
BKE_report(
op->reports,
RPT_WARNING,
@@ -1609,13 +1609,13 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op)
RPT_WARNING,
"Cannot swap '%s' and '%s' as one or both will not be able to fit in their "
"new places",
- sa->name,
+ area->name,
sb->name);
}
}
/* add strips back to track now */
- BKE_nlatrack_add_strip(nlt, sa);
+ BKE_nlatrack_add_strip(nlt, area);
BKE_nlatrack_add_strip(nlt, sb);
}