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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user