Commit: 7f80b5e675ccffb8fa4d8b98d5bfdc2678dcedaf Author: Amelie Fondevilla Date: Mon Nov 14 17:50:51 2022 +0100 Branches: master https://developer.blender.org/rB7f80b5e675ccffb8fa4d8b98d5bfdc2678dcedaf
Animation: rearrange grease pencil channels in the main dopesheet Operations to rearrange channels in the main dopesheet did not cover grease pencil layer channels. Now grease pencil layer channels can be moved up and down in the main dopesheet just like other channels. Reviewed By: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D15542 =================================================================== M source/blender/editors/animation/anim_channels_edit.c =================================================================== diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index e86e1f16e54..a83266c484e 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1444,15 +1444,20 @@ static void rearrange_gpencil_channels(bAnimContext *ac, eRearrangeAnimChan_Mode } /* get Grease Pencil datablocks */ - filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA); + filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA | + ANIMFILTER_LIST_CHANNELS); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); for (ale = anim_data.first; ale; ale = ale->next) { + /* only consider grease pencil container channels */ + if (!ELEM(ale->type, ANIMTYPE_GPDATABLOCK, ANIMTYPE_DSGPENCIL)) { + continue; + } + ListBase anim_data_visible = {NULL, NULL}; bGPdata *gpd = ale->data; /* only consider layers if this datablock is open */ - BLI_assert(ale->type == ANIMTYPE_GPDATABLOCK); if ((gpd->flag & GP_DATA_EXPAND) == 0) { continue; } @@ -1510,6 +1515,10 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op) bAnimListElem *ale; int filter; + if (ELEM(ac.datatype, ANIMCONT_DOPESHEET, ANIMCONT_TIMELINE)) { + rearrange_gpencil_channels(&ac, mode); + } + /* get animdata blocks */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA | ANIMFILTER_FCURVESONLY); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs