Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-03-18 14:14:05 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-03-18 14:37:00 +0300
commitd7fb38ddd4afdb44a97a3ac9d5d3a73509f83a90 (patch)
tree6efc5a50909531eab47286fd81773abff5e91207
parent8ab52daa3aafcec7c8780653090c2be49eeb6748 (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.
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c5
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);
}