diff options
author | Antonioya <blendergit@gmail.com> | 2018-11-10 14:57:51 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-11-10 14:58:07 +0300 |
commit | f1ae7f9cc1b9578c742ef14ccde9db76fd7311fe (patch) | |
tree | 60a9316d6d1ee535e21a14b2979ddcd5d949d4f1 /source/blender | |
parent | e8251289d2cce3fa5fe0586abd50c8c5d5101d09 (diff) |
GP: Autolock layers was not working with dopesheet
Also fixed a delayed update of the panels
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 8abef494313..959dff28c18 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -2919,6 +2919,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index, } case ANIMTYPE_GPLAYER: { + bGPdata *gpd = (bGPdata *)ale->id; bGPDlayer *gpl = (bGPDlayer *)ale->data; /* select/deselect */ @@ -2935,10 +2936,12 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index, /* change active layer, if this is selected (since we must always have an active layer) */ if (gpl->flag & GP_LAYER_SELECT) { ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, gpl, ANIMTYPE_GPLAYER); + /* update other layer status */ + BKE_gpencil_layer_setactive(gpd, gpl); } - WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL); /* Grease Pencil updates */ - notifierFlags |= (ND_ANIMCHAN | NA_EDITED); /* Animation Ediotrs updates */ + WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL); /* Grease Pencil updates */ + notifierFlags |= (ND_ANIMCHAN | NA_EDITED); /* Animation Editors updates */ break; } case ANIMTYPE_MASKDATABLOCK: |