[Bf-blender-cvs] [f033fa0fbcf] master: GPencil: Set active layer when click in Dopesheet keyframe area
Antonio Vazquez
noreply at git.blender.org
Fri Aug 30 11:59:12 CEST 2019
Commit: f033fa0fbcfb78fe08f8eb8ee7ca90eebce3df81
Author: Antonio Vazquez
Date: Fri Aug 30 11:57:47 2019 +0200
Branches: master
https://developer.blender.org/rBf033fa0fbcfb78fe08f8eb8ee7ca90eebce3df81
GPencil: Set active layer when click in Dopesheet keyframe area
Now, when clicking in the keys area, the layer is synchronized, not only in the left area with the names. This is one of the most requested feature by artists.
Also, removed some old comments.
Reviewers: brecht, angavrilov
Reviewed By: brecht
Subscribers: pepeland, mendio
Differential Revision: https://developer.blender.org/D5627
===================================================================
M source/blender/editors/space_action/action_select.c
===================================================================
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 9e2634b183a..8504ab9f469 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -1717,22 +1717,25 @@ static void mouse_action_keys(bAnimContext *ac,
/* Highlight GPencil Layer */
if (ale != NULL && ale->data != NULL && ale->type == ANIMTYPE_GPLAYER) {
+ bGPdata *gpd = (bGPdata *)ale->id;
bGPDlayer *gpl = ale->data;
gpl->flag |= GP_LAYER_SELECT;
- // gpencil_layer_setactive(gpd, gpl);
+ /* Update other layer status. */
+ if (BKE_gpencil_layer_getactive(gpd) != gpl) {
+ BKE_gpencil_layer_setactive(gpd, gpl);
+ WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
+ }
}
}
else if (ac->datatype == ANIMCONT_MASK) {
/* deselect all other channels first */
ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
- /* Highlight GPencil Layer */
if (ale != NULL && ale->data != NULL && ale->type == ANIMTYPE_MASKLAYER) {
MaskLayer *masklay = ale->data;
masklay->flag |= MASK_LAYERFLAG_SELECT;
- // gpencil_layer_setactive(gpd, gpl);
}
}
}
More information about the Bf-blender-cvs
mailing list