diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-07-07 09:28:09 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-07-07 09:28:09 +0400 |
commit | 242ca1bdce4ea29e0b05e6e1936f491ca0717147 (patch) | |
tree | 183f233f0becddab9faf8641b04051950d403d8a /source/blender/editors | |
parent | 2791e12e715cfd97012b959319518ac93a4169db (diff) |
NLA Drawing - Second attempt at providing options for streamlining the
view for transforming strips
When the "Include animation data blocks with no NLA data" toggle
(action icon) is off, action lines are only shown if they have
keyframes. So when this option is off, only NLA blocks that have NLA
tracks will be shown, and of those, only those which currently have an
active action with keyframes will have their red action lines shown.
Combined with the vertical-space tweak when show control curves is
turned off, this should be good enough for most cases.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index b7264ae9a3e..d5048984e7f 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1097,7 +1097,7 @@ static size_t animfilter_action (bAnimContext *ac, ListBase *anim_data, bDopeShe * - for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation * order, i.e. first to last. Otherwise, some tools may get screwed up. */ -static size_t animfilter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *UNUSED(ads), AnimData *adt, int filter_mode, ID *owner_id) +static size_t animfilter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, ID *owner_id) { NlaTrack *nlt; NlaTrack *first=NULL, *next=NULL; @@ -1105,16 +1105,21 @@ static size_t animfilter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDo /* if showing channels, include active action */ if (filter_mode & ANIMFILTER_LIST_CHANNELS) { - /* there isn't really anything editable here, so skip if need editable */ - if ((filter_mode & ANIMFILTER_FOREDIT) == 0) { - /* just add the action track now (this MUST appear for drawing) - * - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then - * overwrite this with the real value - REVIEW THIS... - */ - ANIMCHANNEL_NEW_CHANNEL_FULL((void *)(&adt->action), ANIMTYPE_NLAACTION, owner_id, - { - ale->data= adt->action ? adt->action : NULL; - }); + /* if NLA action-line filtering is off, don't show unless there are keyframes, + * in order to keep things more compact for doing transforms + */ + if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) || (adt->action)) { + /* there isn't really anything editable here, so skip if need editable */ + if ((filter_mode & ANIMFILTER_FOREDIT) == 0) { + /* just add the action track now (this MUST appear for drawing) + * - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then + * overwrite this with the real value - REVIEW THIS... + */ + ANIMCHANNEL_NEW_CHANNEL_FULL((void *)(&adt->action), ANIMTYPE_NLAACTION, owner_id, + { + ale->data= adt->action ? adt->action : NULL; + }); + } } /* first track to include will be the last one if we're filtering by channels */ |