[Bf-blender-cvs] [02e3eb1ee75] greasepencil-object: Fix: Crash when unhiding a GP layer in the dopesheet if the frame has changed in the meantime

Joshua Leung noreply at git.blender.org
Sat Nov 4 05:48:56 CET 2017


Commit: 02e3eb1ee75e217cefde88e4b52f694c4bb55061
Author: Joshua Leung
Date:   Sat Nov 4 15:40:46 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rB02e3eb1ee75e217cefde88e4b52f694c4bb55061

Fix: Crash when unhiding a GP layer in the dopesheet if the frame has changed in the meantime

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

M	source/blender/editors/animation/anim_channels_defines.c

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

diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index cf4f25c4a79..24b3a332788 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -64,6 +64,7 @@
 
 #include "BKE_animsys.h"
 #include "BKE_curve.h"
+#include "BKE_gpencil.h"
 #include "BKE_key.h"
 #include "BKE_nla.h"
 #include "BKE_context.h"
@@ -4123,8 +4124,15 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
 		return;
 	}
 
-	if (ale_setting->type == ANIMTYPE_GPLAYER)
+	if (ale_setting->type == ANIMTYPE_GPLAYER) {
+		/* draw cache updates for settings that affect the visible strokes */
+		if (setting == ACHANNEL_SETTING_VISIBLE) {
+			BKE_gpencil_batch_cache_dirty((bGPdata *)ale_setting->id);
+		}
+		
+		/* UI updates */
 		WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
+	}
 	
 	/* verify animation context */
 	if (ANIM_animdata_get_context(C, &ac) == 0)



More information about the Bf-blender-cvs mailing list