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:
authorJoshua Leung <aligorith@gmail.com>2011-01-19 02:38:36 +0300
committerJoshua Leung <aligorith@gmail.com>2011-01-19 02:38:36 +0300
commitdddb9aa30f96961023f02846c97c955e1f2b5f0c (patch)
tree60bab060fefd0d7b9eeb5befa985fd6893b21b5a /source/blender/blenkernel/intern/nla.c
parent11f8b5fceb45b6e7a04686fa6f9ed255c83b58a4 (diff)
NLA Editor: Swap Strips (Alt-F) and Bugfixes
1) Added a new operator to swap the order of strips within a track (Alt-F). This makes it possible to select two strips (or more precisely, two islands of consecutive + selected strips) in a single track and change the order in which the appear without needing a extra tracks to perform the move through. As usual, the non-overlapping rules apply, so there may be some cases where swapping in this way is not possible without adjusting the intermediate strips first manually. Otherwise, everything just gets too tricky to manage deciding what adjustments should be done to the obstructing strips to make a fit. 2) Freeing meta-strips didn't free their local data properly (i.e. modifiers they may have had). 3) Adding strips to tracks, where the endframes for the strips overlapped would cause problems with incorrect ordering of strips. I still need to double-check whether evaluation works ok in this case...
Diffstat (limited to 'source/blender/blenkernel/intern/nla.c')
-rw-r--r--source/blender/blenkernel/intern/nla.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 595614ef1e7..ea2948f305e 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -514,7 +514,7 @@ short BKE_nlastrips_has_space (ListBase *strips, float start, float end)
/* if start frame of strip is past the target end-frame, that means that
* we've gone past the window we need to check for, so things are fine
*/
- if (strip->start > end)
+ if (strip->start >= end)
return 1;
/* if the end of the strip is greater than either of the boundaries, the range
@@ -591,7 +591,7 @@ short BKE_nlastrips_add_strip (ListBase *strips, NlaStrip *strip)
/* find the right place to add the strip to the nominated track */
for (ns= strips->first; ns; ns= ns->next) {
/* if current strip occurs after the new strip, add it before */
- if (ns->start > strip->end) {
+ if (ns->start >= strip->end) {
BLI_insertlinkbefore(strips, ns, strip);
not_added= 0;
break;
@@ -683,7 +683,7 @@ void BKE_nlastrips_clear_metastrip (ListBase *strips, NlaStrip *strip)
}
/* free the meta-strip now */
- BLI_freelinkN(strips, strip);
+ free_nlastrip(strips, strip);
}
/* Remove meta-strips (i.e. flatten the list of strips) from the top-level of the list of strips