[Bf-blender-cvs] [f1ae7f9cc1b] blender2.8: GP: Autolock layers was not working with dopesheet

Antonioya noreply at git.blender.org
Sat Nov 10 13:07:00 CET 2018


Commit: f1ae7f9cc1b9578c742ef14ccde9db76fd7311fe
Author: Antonioya
Date:   Sat Nov 10 12:57:51 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBf1ae7f9cc1b9578c742ef14ccde9db76fd7311fe

GP: Autolock layers was not working with dopesheet

Also fixed a delayed update of the panels

===================================================================

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 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:



More information about the Bf-blender-cvs mailing list