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/editors/space_nla | |
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/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index b0d5360e29b..9e43a8ce109 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -408,6 +408,24 @@ static uint nla_draw_use_dashed_outlines(const float color[4], bool muted) return shdr_pos; } +/** This check only accounts for the track's disabled flag and whether the strip is being tweaked. + * It does not account for muting or soloing. */ +static bool is_nlastrip_enabled(AnimData *adt, NlaTrack *nlt, NlaStrip *strip) +{ + /** This shouldn't happen. If passed NULL, then just treat strip as enabled. */ + BLI_assert(adt); + if (!adt) { + return true; + } + + if ((nlt->flag & NLATRACK_DISABLED) == 0) { + return true; + } + + /** For disabled tracks, only the tweaked strip is enabled. */ + return adt->actstrip == strip; +} + /* main call for drawing a single NLA-strip */ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, @@ -470,7 +488,7 @@ static void nla_draw_strip(SpaceNla *snla, } /* draw 'inside' of strip itself */ - if (non_solo == 0) { + if (non_solo == 0 && is_nlastrip_enabled(adt, nlt, strip)) { immUnbindProgram(); /* strip is in normal track */ |