[Bf-blender-cvs] [d7fb38ddd4a] master: GPencil: Fix unreported datablock type changed using Dopesheet box select
Antonio Vazquez
noreply at git.blender.org
Thu Mar 18 12:37:18 CET 2021
Commit: d7fb38ddd4afdb44a97a3ac9d5d3a73509f83a90
Author: Antonio Vazquez
Date: Thu Mar 18 12:14:05 2021 +0100
Branches: master
https://developer.blender.org/rBd7fb38ddd4afdb44a97a3ac9d5d3a73509f83a90
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.
===================================================================
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 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);
}
More information about the Bf-blender-cvs
mailing list