diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-09-03 07:37:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-09-03 08:15:45 +0300 |
commit | 4a3243f311c75d8b15fc39ec07dd57ecb40bd32f (patch) | |
tree | aca14d056097b4e23070d717d43e732e6fabcab9 /source/blender/editors/animation/anim_filter.c | |
parent | 6fc92b296fae474c5b9bb2ea996f51cef75bd9c6 (diff) |
Docs: add note to skip_fcurve_selected_data sequence strip check
Without an explanation the sequencer logic looked wrong since
other selection checks don't skip data that can't be found.
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 7e3e3f363c2..104540e2257 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1111,7 +1111,27 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id /* Can only add this F-Curve if it is selected. */ if (ads->filterflag & ADS_FILTER_ONLYSEL) { - if ((seq == NULL) || (seq->flag & SELECT) == 0) { + + /* NOTE(@campbellbarton): The `seq == NULL` check doesn't look right + * (compared to other checks in this function which skip data that can't be found). + * + * This is done since the search for sequence strips doesn't use a global lookup: + * - Nested meta-strips are excluded. + * - When inside a meta-strip - strips outside the meta-strip excluded. + * + * Instead, only the strips directly visible to the user are considered for selection. + * The NULL check here means everything else is considered unselected and is not shown. + * + * There is a subtle difference between nodes, pose-bones ... etc + * since data-paths that point to missing strips are not shown. + * If this is an important difference, the NULL case could perform a global lookup, + * only returning `true` if the sequence strip exists elsewhere + * (ignoring it's selection state). */ + if (seq == NULL) { + return true; + } + + if ((seq->flag & SELECT) == 0) { return true; } } |