diff options
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 11 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 9 |
2 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index fa52bdcb854..e7edafdddf5 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1428,9 +1428,14 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode, * - but for Graph Editor, this gets used also from main region * where hierarchy doesn't apply [#21276] */ - // FIXME: graph editor case - // XXX: noduplis enabled so that results don't cancel, but will be problematic for some channels where only type differs - filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS); + if ((ac->spacetype == SPACE_IPO) && (ac->regiontype != RGN_TYPE_CHANNELS)) { + /* graph editor (case 2) */ + filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS); + } + else { + /* standard case */ + filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_NODUPLIS); + } if (onlysel) filter |= ANIMFILTER_SEL; ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 04d8aa87e14..1f96778c36e 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -964,10 +964,13 @@ static size_t animdata_filter_action (bAnimContext *ac, ListBase *anim_data, bDo filter_gmode= filter_mode; /* if we care about the selection status of the channels, - * but the group isn't expanded... + * but the group isn't expanded (1)... + * (1) this only matters if we actually care about the hierarchy though, + * so if we're not filtering for that, then we shouldn't care, otherwise + * cases like [#21276] won't work properly */ - if ( (filter_mode & (ANIMFILTER_SEL|ANIMFILTER_UNSEL)) && /* care about selection status */ - (EXPANDED_AGRP(ac, agrp)==0) ) /* group isn't expanded */ + if ( ((filter_mode & ANIMFILTER_LIST_VISIBLE) && EXPANDED_AGRP(ac, agrp)==0) && /* care about hierarchy but group isn't expanded */ + (filter_mode & (ANIMFILTER_SEL|ANIMFILTER_UNSEL)) ) /* care about selection status */ { /* if the group itself isn't selected appropriately, we shouldn't consider it's children either */ if (ANIMCHANNEL_SELOK(SEL_AGRP(agrp)) == 0) |