[Bf-blender-cvs] [4a3243f311c] master: Docs: add note to skip_fcurve_selected_data sequence strip check
Campbell Barton
noreply at git.blender.org
Fri Sep 3 07:16:10 CEST 2021
Commit: 4a3243f311c75d8b15fc39ec07dd57ecb40bd32f
Author: Campbell Barton
Date: Fri Sep 3 14:37:36 2021 +1000
Branches: master
https://developer.blender.org/rB4a3243f311c75d8b15fc39ec07dd57ecb40bd32f
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.
===================================================================
M source/blender/editors/animation/anim_filter.c
===================================================================
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;
}
}
More information about the Bf-blender-cvs
mailing list