diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-07-12 08:29:36 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-07-12 08:29:36 +0400 |
commit | fa8bd34d95d91712ffa6dc9066c255e9ee40e7e4 (patch) | |
tree | cbc357062cdb8748ac1bd6943724301439e3745e /source/blender/blenkernel | |
parent | bb158ad5721b98086b77a8168a53c4901540907d (diff) |
NLA Bugfixes:
* Fixed crash when anim-playback is running and a strip beside a transition gets transformed.
Transition strips no-longer assume that their neighbours are action-clips, using the standard NLA-strip evaluation function instead to evaluate their neighbours. However, a check for ping-pong recursion needed to be added there, so that a transition beside a meta-strip, with the meta having a transition nested at the start of one of its levels, wouldn't fail with stack overflow.
* Moved 'Tweak Mode' menu entry to Edit menu, since it's not really that modal.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 19337f9de5d..e4882d8f555 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -1049,12 +1049,12 @@ static void nlastrip_evaluate_transition (PointerRNA *ptr, ListBase *channels, L /* first strip */ tmp_nes.strip_mode= NES_TIME_TRANSITION_START; tmp_nes.strip= s1; - nlastrip_evaluate_actionclip(ptr, &tmp_channels, &tmp_modifiers, &tmp_nes); + nlastrip_evaluate(ptr, &tmp_channels, &tmp_modifiers, &tmp_nes); /* second strip */ tmp_nes.strip_mode= NES_TIME_TRANSITION_END; tmp_nes.strip= s2; - nlastrip_evaluate_actionclip(ptr, &tmp_channels, &tmp_modifiers, &tmp_nes); + nlastrip_evaluate(ptr, &tmp_channels, &tmp_modifiers, &tmp_nes); /* assumulate temp-buffer and full-buffer, using the 'real' strip */ @@ -1108,8 +1108,18 @@ static void nlastrip_evaluate_meta (PointerRNA *ptr, ListBase *channels, ListBas /* evaluates the given evaluation strip */ void nlastrip_evaluate (PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes) { + NlaStrip *strip= nes->strip; + + /* to prevent potential infinite recursion problems (i.e. transition strip, beside meta strip containing a transition + * several levels deep inside it), we tag the current strip as being evaluated, and clear this when we leave + */ + // TODO: be careful with this flag, since some edit tools may be running and have set this while animplayback was running + if (strip->flag & NLASTRIP_FLAG_EDIT_TOUCHED) + return; + strip->flag |= NLASTRIP_FLAG_EDIT_TOUCHED; + /* actions to take depend on the type of strip */ - switch (nes->strip->type) { + switch (strip->type) { case NLASTRIP_TYPE_CLIP: /* action-clip */ nlastrip_evaluate_actionclip(ptr, channels, modifiers, nes); break; @@ -1120,6 +1130,9 @@ void nlastrip_evaluate (PointerRNA *ptr, ListBase *channels, ListBase *modifiers nlastrip_evaluate_meta(ptr, channels, modifiers, nes); break; } + + /* clear temp recursion safe-check */ + strip->flag &= ~NLASTRIP_FLAG_EDIT_TOUCHED; } /* write the accumulated settings to */ |