diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/nla.c | 80 |
1 files changed, 1 insertions, 79 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index e2d22064a37..a94562a32ec 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -1387,39 +1387,6 @@ void BKE_nlastrip_recalculate_bounds(NlaStrip *strip) nlastrip_fix_resize_overlaps(strip); } -/* Is the given NLA-strip the first one to occur for the given AnimData block */ -/* TODO: make this an api method if necessary, but need to add prefix first */ -static bool nlastrip_is_first(AnimData *adt, NlaStrip *strip) -{ - NlaTrack *nlt; - NlaStrip *ns; - - /* sanity checks */ - if (ELEM(NULL, adt, strip)) { - return false; - } - - /* check if strip has any strips before it */ - if (strip->prev) { - return false; - } - - /* check other tracks to see if they have a strip that's earlier */ - /* TODO: or should we check that the strip's track is also the first? */ - for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) { - /* only check the first strip, assuming that they're all in order */ - ns = nlt->strips.first; - if (ns) { - if (ns->start < strip->start) { - return false; - } - } - } - - /* should be first now */ - return true; -} - /* Animated Strips ------------------------------------------- */ bool BKE_nlatrack_has_animated_strips(NlaTrack *nlt) @@ -1739,7 +1706,7 @@ static void BKE_nlastrip_validate_autoblends(NlaTrack *nlt, NlaStrip *nls) void BKE_nla_validate_state(AnimData *adt) { - NlaStrip *strip, *fstrip = NULL; + NlaStrip *strip = NULL; NlaTrack *nlt; /* sanity checks */ @@ -1753,37 +1720,6 @@ void BKE_nla_validate_state(AnimData *adt) for (strip = nlt->strips.first; strip; strip = strip->next) { /* auto-blending first */ BKE_nlastrip_validate_autoblends(nlt, strip); - - /* extend mode - find first strip */ - if ((fstrip == NULL) || (strip->start < fstrip->start)) { - fstrip = strip; - } - } - } - - /* second pass over the strips to adjust the extend-mode to fix any problems */ - for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) { - for (strip = nlt->strips.first; strip; strip = strip->next) { - /* apart from 'nothing' option which user has to explicitly choose, we don't really know if - * we should be overwriting the extend setting (but assume that's what the user wanted) - */ - /* TODO: 1 solution is to tie this in with auto-blending... */ - if (strip->extendmode != NLASTRIP_EXTEND_NOTHING) { - /* 1) First strip must be set to extend hold, otherwise, stuff before acts dodgy - * 2) Only overwrite extend mode if *not* changing it will most probably result in - * occlusion problems, which will occur if... - * - blendmode = REPLACE - * - all channels the same (this is fiddly to test, so is currently assumed) - * - * Should fix problems such as T29869. - */ - if (strip == fstrip) { - strip->extendmode = NLASTRIP_EXTEND_HOLD; - } - else if (strip->blendmode == NLASTRIP_MODE_REPLACE) { - strip->extendmode = NLASTRIP_EXTEND_HOLD_FORWARD; - } - } } } } @@ -1935,20 +1871,6 @@ void BKE_nla_action_pushdown(AnimData *adt, const bool is_liboverride) } } - /* if the strip is the first one in the track it lives in, check if there - * are strips in any other tracks that may be before this, and set the extend - * mode accordingly - */ - if (nlastrip_is_first(adt, strip) == 0) { - /* Not first, so extend mode can only be: - * NLASTRIP_EXTEND_HOLD_FORWARD not NLASTRIP_EXTEND_HOLD, - * so that it doesn't override strips in previous tracks. */ - /* FIXME: this needs to be more automated, since user can rearrange strips */ - if (strip->extendmode == NLASTRIP_EXTEND_HOLD) { - strip->extendmode = NLASTRIP_EXTEND_HOLD_FORWARD; - } - } - /* make strip the active one... */ BKE_nlastrip_set_active(adt, strip); } |