Basic idea is to check whether an element is visible or not, and ignore those that are hidden, during move up/down.
Not for 2.70 most likely, anyway.
Differential D376
Fix T38897: Problems moving animation channels up and down in dope sheet/action editor. Authored by Bastien Montagne (mont29) on Mar 1 2014, 12:31 PM. Tags None Subscribers None
Details
Basic idea is to check whether an element is visible or not, and ignore those that are hidden, during move up/down. Not for 2.70 most likely, anyway.
Diff Detail Event TimelineComment Actions A quick first-look review:
Comment Actions Updated accordingly to comments in first review (and sorry about forgetting to free anim_data_visible :/ ). Comment Actions I think that the way you've got things now (with a temporary local list used in some cases, and the passed-in one being used in other cases) is in some ways even more confusing. Perhaps the following would work better: /* Helper to get list of visible channels */
static void rearrange_animchannels_filter_visible(ListBase *anim_data_visible, bAnimContext *ac, short type)
{
int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(ac, anim_data_visible, filter, ac->data, type);
}
static void rearrange_driver_channels(bAnimContext *ac, AnimData *adt, short mode)
{
ListBase anim_data_visible = {NULL, NULL};
...
rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_FCURVE);
...
rearrange_animchannel_islands(&anim_data_visible, ...);
...
BKE_freelistN(&anim_data_visible);
}
static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, short mode)
{
... similar to rearrange_driver_channels() example above ...
}
... etc ... |