Bugfix [#29869] NLA editor keeps resetting my extrapolation mode every time I

edit a strip in the timeline

Tweaked the behaviour of the overwritting of extrapolation mode so that it is
less destructive when the problems it sets out to fix aren't likely to occur
(namely a top strip blocking everything below it due to extend backwards).
This commit is contained in:
Joshua Leung 2012-01-22 04:39:33 +00:00
parent 7d13619990
commit 4ec5a9a42c
1 changed files with 9 additions and 1 deletions

View File

@ -1448,9 +1448,17 @@ void BKE_nla_validate_state (AnimData *adt)
*/
// 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 iff
* - blendmode = REPLACE
* - all channels the same (this is fiddly to test, so is currently assumed)
*
* Should fix problems such as [#29869]
*/
if (strip == fstrip)
strip->extendmode= NLASTRIP_EXTEND_HOLD;
else
else if (strip->blendmode == NLASTRIP_MODE_REPLACE)
strip->extendmode= NLASTRIP_EXTEND_HOLD_FORWARD;
}
}