diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-04-14 13:24:21 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-04-14 13:24:21 +0300 |
commit | 280dc1163b8f781b60a8a24165f308a758240eed (patch) | |
tree | 329846f7f703a4b638e9a5b1335d1ea19c0d8382 /source/blender/editors/animation/anim_filter.c | |
parent | 1bccbbc04c71ef58bb0f75dde4bb91ebc1bfc512 (diff) | |
parent | ed40d5eaa79972486f743de04e11fb64f4af0049 (diff) |
Merge branch 'master' into gooseberry
Conflicts:
source/blender/editors/space_view3d/drawobject.c
source/blender/physics/intern/BPH_mass_spring.cpp
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index fcbf102fb9d..a47f5943d8a 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1302,7 +1302,7 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop * - active track should still get shown though (even though it has disabled flag set) */ // FIXME: the channels after should still get drawn, just 'differently', and after an active-action channel - if ((adt->flag & ADT_NLA_EDIT_ON) && (nlt->flag & NLATRACK_DISABLED) && !(nlt->flag & NLATRACK_ACTIVE)) + if ((adt->flag & ADT_NLA_EDIT_ON) && (nlt->flag & NLATRACK_DISABLED) && (adt->act_track != nlt)) continue; /* only work with this channel and its subchannels if it is editable */ @@ -1311,6 +1311,30 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop if (ANIMCHANNEL_SELOK(SEL_NLT(nlt))) { /* only include if this track is active */ if (!(filter_mode & ANIMFILTER_ACTIVE) || (nlt->flag & NLATRACK_ACTIVE)) { + /* name based filtering... */ + if (((ads) && (ads->filterflag & ADS_FILTER_BY_FCU_NAME)) && (owner_id)) { + bool track_ok = false, strip_ok = false; + + /* check if the name of the track, or the strips it has are ok... */ + track_ok = BLI_strcasestr(nlt->name, ads->searchstr); + + if (track_ok == false) { + NlaStrip *strip; + for (strip = nlt->strips.first; strip; strip = strip->next) { + if (BLI_strcasestr(strip->name, ads->searchstr)) { + strip_ok = true; + break; + } + } + } + + /* skip if both fail this test... */ + if (!track_ok && !strip_ok) { + continue; + } + } + + /* add the track now that it has passed all our tests */ ANIMCHANNEL_NEW_CHANNEL(nlt, ANIMTYPE_NLATRACK, owner_id); } } |