[Bf-blender-cvs] [c3650e496b6] master: Fix missing update when toggling NLA solo mode.

Alexander Gavrilov noreply at git.blender.org
Sun Dec 23 15:33:28 CET 2018


Commit: c3650e496b6fa67616280617f3444a9a4bbc7e66
Author: Alexander Gavrilov
Date:   Sun Dec 23 17:02:38 2018 +0300
Branches: master
https://developer.blender.org/rBc3650e496b6fa67616280617f3444a9a4bbc7e66

Fix missing update when toggling NLA solo mode.

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

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 341bc25875e..c00b1a4d2fa 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -4095,10 +4095,11 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
 }
 
 /* callback for wrapping NLA Track "solo" toggle logic */
-static void achannel_nlatrack_solo_widget_cb(bContext *C, void *adt_poin, void *nlt_poin)
+static void achannel_nlatrack_solo_widget_cb(bContext *C, void *ale_poin, void *UNUSED(arg2))
 {
-	AnimData *adt = adt_poin;
-	NlaTrack *nlt = nlt_poin;
+	bAnimListElem *ale = ale_poin;
+	AnimData *adt = ale->adt;
+	NlaTrack *nlt = ale->data;
 
 	/* Toggle 'solo' mode. There are several complications here which need explaining:
 	 * - The method call is needed to perform a few additional validation operations
@@ -4111,6 +4112,7 @@ static void achannel_nlatrack_solo_widget_cb(bContext *C, void *adt_poin, void *
 	BKE_nlatrack_solo_toggle(adt, nlt);
 
 	/* send notifiers */
+	DEG_id_tag_update(ale->id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE);
 	WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_RENAME, NULL);
 }
 
@@ -4407,7 +4409,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, const bAni
 
 				/* settings needing special attention */
 				case ACHANNEL_SETTING_SOLO: /* NLA Tracks - Solo toggle */
-					UI_but_func_set(but, achannel_nlatrack_solo_widget_cb, ale->adt, ale->data);
+					UI_but_funcN_set(but, achannel_nlatrack_solo_widget_cb, MEM_dupallocN(ale), NULL);
 					break;
 
 				/* no flushing */



More information about the Bf-blender-cvs mailing list