diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-03-18 14:14:05 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-03-18 14:37:00 +0300 |
commit | d7fb38ddd4afdb44a97a3ac9d5d3a73509f83a90 (patch) | |
tree | 6efc5a50909531eab47286fd81773abff5e91207 /source/blender/editors/animation | |
parent | 8ab52daa3aafcec7c8780653090c2be49eeb6748 (diff) |
GPencil: Fix unreported datablock type changed using Dopesheet box select
When doing a box selection in the dopesheet in the header area, the data block type was changed to annotation because the pointer was not usable and produced an unexpected result.
Thanks to @pullup for finding a way to reproduce the bug.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 711ec0a9d22..64082b08da9 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -2689,6 +2689,11 @@ static void box_select_anim_channels(bAnimContext *ac, rcti *rect, short selectm /* loop over data, doing box select */ for (ale = anim_data.first; ale; ale = ale->next) { float ymin; + /* Skip grease pencil datablock. Only use grease pencil layers. */ + if (ale->type == ANIMTYPE_GPDATABLOCK) { + continue; + } + if (ac->datatype == ANIMCONT_NLA) { ymin = ymax - NLACHANNEL_STEP(snla); } |