Fix #129967: Annotations in the VSE not showing in Dope Sheet

The issue was that with the move to Grease Pencil v3,
annotations and normal GP use different IDs and support to show annotations
wasn't added back in.

This makes it so annotation keys are shown if "Only Show Selected" is disabled,
which works in the Dope Sheet and in the timeline.

In order to not show annotations of the scene twice, the scene-specific code is removed.
The annotations are now shown in a more generic way.

Pull Request: https://projects.blender.org/blender/blender/pulls/134565
This commit is contained in:
Christoph Lendenfeld
2025-02-18 10:33:53 +01:00
committed by Christoph Lendenfeld
parent 19631cae8a
commit 996d19d4b3

View File

@@ -3392,7 +3392,6 @@ static size_t animdata_filter_dopesheet_scene(bAnimContext *ac,
/* filter data contained under object first */
BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_SCEC(sce)) {
bNodeTree *ntree = sce->nodetree;
bGPdata *gpd = sce->gpd;
World *wo = sce->world;
/* Action, Drivers, or NLA for Scene */
@@ -3415,11 +3414,6 @@ static size_t animdata_filter_dopesheet_scene(bAnimContext *ac,
tmp_items += animdata_filter_ds_linestyle(ac, &tmp_data, sce, filter_mode);
}
/* grease pencil */
if ((gpd) && !(ac->ads->filterflag & ADS_FILTER_NOGPENCIL)) {
tmp_items += animdata_filter_ds_gpencil(ac, &tmp_data, gpd, filter_mode);
}
/* TODO: one day, when sequencer becomes its own datatype,
* perhaps it should be included here. */
}
@@ -3665,6 +3659,15 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac,
}
}
/* Annotations are always shown if "Only Show Selected" is disabled. This works in the Timeline
* as well as in the Dope Sheet.*/
if (!(ac->ads->filterflag & ADS_FILTER_ONLYSEL) && !(ac->ads->filterflag & ADS_FILTER_NOGPENCIL))
{
LISTBASE_FOREACH (bGPdata *, gp_data, &ac->bmain->gpencils) {
items += animdata_filter_ds_gpencil(ac, anim_data, gp_data, filter_mode);
}
}
/* movie clip's animation */
if (!(ac->ads->filterflag2 & ADS_FILTER_NOMOVIECLIPS) &&
!(ac->ads->filterflag & ADS_FILTER_ONLYSEL))