GPv3: Display layer groups in grease pencil dopesheet #111015
@ -3647,6 +3647,19 @@ static int click_select_channel_grease_pencil_datablock(bAnimListElem *ale)
|
||||
return (ND_ANIMCHAN | NA_EDITED);
|
||||
}
|
||||
|
||||
static int click_select_channel_grease_pencil_layer_group(bAnimListElem *ale)
|
||||
{
|
||||
GreasePencilLayerTreeGroup *layer_group = static_cast<GreasePencilLayerTreeGroup *>(ale->data);
|
||||
|
||||
/* Toggle expand:
|
||||
* - Although the triangle widget already allows this,
|
||||
* the whole channel can also be used for this purpose.
|
||||
*/
|
||||
layer_group->base.flag ^= GP_LAYER_TREE_NODE_EXPANDED;
|
||||
|
||||
return (ND_ANIMCHAN | NA_EDITED);
|
||||
}
|
||||
|
||||
static int click_select_channel_grease_pencil_layer(bContext *C,
|
||||
bAnimContext *ac,
|
||||
bAnimListElem *ale,
|
||||
@ -3815,6 +3828,9 @@ static int mouse_anim_channels(bContext *C,
|
||||
case ANIMTYPE_GREASE_PENCIL_DATABLOCK:
|
||||
notifierFlags |= click_select_channel_grease_pencil_datablock(ale);
|
||||
break;
|
||||
case ANIMTYPE_GREASE_PENCIL_LAYER_GROUP:
|
||||
notifierFlags |= click_select_channel_grease_pencil_layer_group(ale);
|
||||
break;
|
||||
case ANIMTYPE_GREASE_PENCIL_LAYER:
|
||||
notifierFlags |= click_select_channel_grease_pencil_layer(C, ac, ale, selectmode, filter);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user