diff options
author | Wayde Moss <GuiltyGhost> | 2020-09-16 15:49:55 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-09-16 15:52:48 +0300 |
commit | d067c13a9d07c7b2d21aa75a93d95d42e0609aa0 (patch) | |
tree | cc30d9f34b57b9265f72835172f1993862e20f96 /source/blender/blenkernel/intern | |
parent | be11603dc224345a1b75e8cdf7b0c5396db0d94d (diff) |
NLA: Always Show All Strips
Currently, it's difficult to use the NLA system for users who are only
interested in using it as animation layers.
Entering tweak mode hides strips which are not evaluated. If the user
wanted to edit a different strip, they must exit tweak mode, look for
the strip, select it then re-enter tweak mode.
Solution:
All strips are always shown. The user can now see the next strip they
want to start editing.
Reviewed By: Sybren, Sebastian Parborg
Differential Revision: http://developer.blender.org/D7600
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/nla.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index b7d6c7a5a28..828a6c99838 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -2077,10 +2077,10 @@ 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 + /* Go over all the tracks, tagging each strip that uses the same + * action as the active strip, but leaving everything else alone. */ - for (nlt = activeTrack->prev; nlt; nlt = nlt->prev) { + for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) { for (strip = nlt->strips.first; strip; strip = strip->next) { if (strip->act == activeStrip->act) { strip->flag |= NLASTRIP_FLAG_TWEAKUSER; @@ -2091,15 +2091,9 @@ bool BKE_nla_tweakmode_enter(AnimData *adt) } } - /* tag all other strips in active track that uses the same action as the active strip */ - for (strip = activeTrack->strips.first; strip; strip = strip->next) { - if ((strip->act == activeStrip->act) && (strip != activeStrip)) { - strip->flag |= NLASTRIP_FLAG_TWEAKUSER; - } - else { - strip->flag &= ~NLASTRIP_FLAG_TWEAKUSER; - } - } + /* Untag tweaked track. This leads to non tweaked actions being drawn differently than the + * tweaked action. */ + activeStrip->flag &= ~NLASTRIP_FLAG_TWEAKUSER; /* go over all the tracks after AND INCLUDING the active one, tagging them as being disabled * - the active track needs to also be tagged, otherwise, it'll overlap with the tweaks going on |