diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-10-08 14:02:58 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-10-08 14:08:07 +0300 |
commit | bf969e9ddee34c49e99bfff168667e0bf5c74d6c (patch) | |
tree | 7c6af933dcc396b62314f4c6a3249a41b392712d /source/blender/blenkernel/intern/nla.c | |
parent | afeca633c283f85ac0fd2f7c5cc725763265fa5a (diff) |
Fix T46391: Sync Length in NLA is not working on all instances of clip
Diffstat (limited to 'source/blender/blenkernel/intern/nla.c')
-rw-r--r-- | source/blender/blenkernel/intern/nla.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 378bb82be17..20697659e63 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -1778,7 +1778,7 @@ bool BKE_nla_tweakmode_enter(AnimData *adt) } return false; } - + /* go over all the tracks up to the active one, tagging each strip that uses the same * action as the active strip, but leaving everything else alone */ @@ -1859,8 +1859,19 @@ void BKE_nla_tweakmode_exit(AnimData *adt) for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) { nlt->flag &= ~NLATRACK_DISABLED; - for (strip = nlt->strips.first; strip; strip = strip->next) + for (strip = nlt->strips.first; strip; strip = strip->next) { + /* sync strip extents if this strip uses the same action */ + if ((adt->actstrip) && (adt->actstrip->act == strip->act) && (strip->flag & NLASTRIP_FLAG_SYNC_LENGTH)) { + /* recalculate the length of the action */ + calc_action_range(strip->act, &strip->actstart, &strip->actend, 0); + + /* adjust the strip extents in response to this */ + BKE_nlastrip_recalculate_bounds(strip); + } + + /* clear tweakuser flag */ strip->flag &= ~NLASTRIP_FLAG_TWEAKUSER; + } } /* handle AnimData level changes: |