diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-02-27 09:36:13 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-02-28 16:34:43 +0300 |
commit | b44201d8b91011434b6edbbabd7784160cb94cc6 (patch) | |
tree | 2eca1d750735e7643b08dc6cfefee1fbbd1151fe /source | |
parent | bb7ce9173af240a60311df64672fa48744199098 (diff) |
Fix for NLA Solo/Mute behaviour
The Solo and Mute functionality for the NLA system should really be mutually
exclusive features. They both affect whether a given track applies or not.
The only difference is that the Solo option mutes all the others, while the Mute
only does this on a per track basis.
Before this fix, muting a strip and then making it solo meant that the solo'd
track would not play at all, which isn't really what we want.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 8e2b3de9586..effe32a8079 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -2465,13 +2465,19 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData if ((adt->flag & ADT_NLA_EDIT_ON) && (nlt->flag & NLATRACK_DISABLED)) break; - /* skip if we're only considering a track tagged 'solo' */ - if ((adt->flag & ADT_NLA_SOLO_TRACK) && (nlt->flag & NLATRACK_SOLO) == 0) - continue; - /* skip if track is muted */ - if (nlt->flag & NLATRACK_MUTED) - continue; - + /* solo and muting are mutually exclusive... */ + if (adt->flag & ADT_NLA_SOLO_TRACK) { + /* skip if there is a solo track, but this isn't it */ + if ((nlt->flag & NLATRACK_SOLO) == 0) + continue; + /* else - mute doesn't matter */ + } + else { + /* no solo tracks - skip track if muted */ + if (nlt->flag & NLATRACK_MUTED) + continue; + } + /* if this track has strips (but maybe they won't be suitable), set has_strips * - used for mainly for still allowing normal action evaluation... */ |