This just needed another entry in 'animdata_filter_dopesheet_ob' to loop
over (geometry nodes) modifiers and process their nodetrees animdata via
the (already existing) animdata_filter_ds_nodetree.
Details
- Reviewers
Sybren A. Stüvel (sybren) Hans Goudey (HooglyBoogly) Dalai Felinto (dfelinto) - Group Reviewers
Animation & Rigging - Maniphest Tasks
- T85356: Dope Sheet not showing keyframes of Geometry Nodes graph
Diff Detail
- Repository
- rB Blender
- Branch
- T85356 (branched from master)
- Build Status
Buildable 12627 Build 12627: arc lint + arc unit
Event Timeline
Adding Animation & Rigging as blocking reviewer, as per our experimental code review guidelines.
The animdata_filter_ds_modifiers() function already loops over animation data from modifiers. Wouldn't it be possible to extend animfilter_modifier_idpoin_cb() (used by animdata_filter_ds_modifiers()) to handle node trees?
BKE_modifiers_foreach_ID_link / animfilter_modifier_idpoin_cb is just for IDs referenced in modifiers (e.g. textures), see the comment above animdata_filter_ds_modifiers
we could consider including that animdata for geonodetrees as well, but I would still think this needs to be separated from animdata_filter_ds_modifiers
I still don't understand what you mean. This patch seems to work fine on the test file from T85356:
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index f2022194ed5..a03f19d0111 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -2403,6 +2403,13 @@ static void animfilter_modifier_idpoin_cb(void *afm_ptr, } break; } + case ID_NT: { + bNodeTree *node_tree = (bNodeTree *)id; + if (!(afm->ads->filterflag & ADS_FILTER_NONTREE)) { + afm->items += animdata_filter_ds_nodetree( + afm->ac, &afm->tmp_data, afm->ads, owner_id, node_tree, afm->filter_mode); + } + } /* TODO: images? */ default:
This approach extends the existing structure that loops over all modifiers and follows ID pointers. Extending it further when necessary is then just a matter of adding another case to the switch.
Interesting.
I was not aware that the nodetree is actually part of NodesModifierData->settings.properties (still looking where this is actually made part of it).
I was also reading the comment for animdata_filter_ds_modifiers wrong it seems.
But you are right, your solution seems more straightforward in the end.