From 4843b161d6cc14045f05d8df76f39795d5fcc6b3 Mon Sep 17 00:00:00 2001 From: Amelie Fondevilla Date: Wed, 20 Jul 2022 12:28:50 +0200 Subject: Fix T99870 : Prevents crash when rearranging channels in dopesheet The function to rearrange channels only works for F-curves channels for now, adding the `FCURVESONLY` filter prevents the function to be called for grease pencil channels, thereby fixing the crash. Reviewed by : sybren Differential Revision: http://developer.blender.org/D15504 --- source/blender/editors/animation/anim_channels_edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/animation') diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 8464f280c29..f371591c3a8 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1498,7 +1498,8 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op) int filter; /* get animdata blocks */ - filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA); + filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ANIMDATA | + ANIMFILTER_FCURVESONLY); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); for (ale = anim_data.first; ale; ale = ale->next) { -- cgit v1.2.3