diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-05-08 13:00:59 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-05-08 13:01:32 +0400 |
commit | 56df85b227ff76a2ea3fefefb80db602749cd288 (patch) | |
tree | 8c8f576a118701342ddab35822d2a10015557ffb /source/blender/blenkernel/intern/anim_sys.c | |
parent | e21d410804f3085c1b6a3384a59d9335e5fcfcc6 (diff) |
Bugfix T40082: NLA Meta strips were no longer evaluating correctly
It seems that since the changes to how new NLA strips are handled, accumulating
these in a temporary buffer and then trying to combine the results didn't
work that great anymore.
Diffstat (limited to 'source/blender/blenkernel/intern/anim_sys.c')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 7e6af94030d..ef6f5fb8f39 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -2117,7 +2117,6 @@ static void nlastrip_evaluate_transition(PointerRNA *ptr, ListBase *channels, Li /* evaluate meta-strip */ static void nlastrip_evaluate_meta(PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes) { - ListBase tmp_channels = {NULL, NULL}; ListBase tmp_modifiers = {NULL, NULL}; NlaStrip *strip = nes->strip; NlaEvalStrip *tmp_nes; @@ -2130,23 +2129,18 @@ static void nlastrip_evaluate_meta(PointerRNA *ptr, ListBase *channels, ListBase * * NOTE: keep this in sync with animsys_evaluate_nla() */ - + /* join this strip's modifiers to the parent's modifiers (own modifiers first) */ nlaeval_fmodifiers_join_stacks(&tmp_modifiers, &strip->modifiers, modifiers); /* find the child-strip to evaluate */ evaltime = (nes->strip_time * (strip->end - strip->start)) + strip->start; tmp_nes = nlastrips_ctime_get_strip(NULL, &strip->strips, -1, evaltime); - if (tmp_nes == NULL) - return; - - /* evaluate child-strip into tmp_channels buffer before accumulating - * in the accumulation buffer - */ - nlastrip_evaluate(ptr, &tmp_channels, &tmp_modifiers, tmp_nes); - /* accumulate temp-buffer and full-buffer, using the 'real' strip */ - nlaevalchan_buffers_accumulate(channels, &tmp_channels, nes); + /* directly evaluate child strip into accumulation buffer... + * - there's no need to use a temporary buffer (as it causes issues [T40082]) + */ + nlastrip_evaluate(ptr, channels, &tmp_modifiers, tmp_nes); /* free temp eval-strip */ MEM_freeN(tmp_nes); @@ -2269,7 +2263,7 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData * - used for mainly for still allowing normal action evaluation... */ if (nlt->strips.first) - has_strips = 1; + has_strips = true; /* otherwise, get strip to evaluate for this channel */ nes = nlastrips_ctime_get_strip(&estrips, &nlt->strips, track_index, ctime); |