[Bf-blender-cvs] [9e76f13] master: Fix T40304: Rearranging NLA Tracks (and actually, all animation channels) didn't work anymore

Joshua Leung noreply at git.blender.org
Thu May 22 05:47:50 CEST 2014


Commit: 9e76f13e6b1b3c5f9760879ba3c026b491330b14
Author: Joshua Leung
Date:   Thu May 22 15:25:54 2014 +1200
https://developer.blender.org/rB9e76f13e6b1b3c5f9760879ba3c026b491330b14

Fix T40304: Rearranging NLA Tracks (and actually, all animation channels) didn't work anymore

These were broken by 1f3655d224196129fc6daf20e678199b95321bff, since
an argument of the wrong type was getting passed to ANIM_animdata_filter(),
resulting in no channels ever being picked up for the "visible channels" list.

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

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 2b85cae..eab78f1 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -880,9 +880,23 @@ static void rearrange_animchannel_flatten_islands(ListBase *islands, ListBase *s
 
 static void rearrange_animchannels_filter_visible(ListBase *anim_data_visible, bAnimContext *ac, short type)
 {
+	ListBase anim_data = {NULL, NULL};
+	bAnimListElem *ale, *ale_next;
     int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
-
-    ANIM_animdata_filter(ac, anim_data_visible, filter, ac->data, type);
+	
+	/* get all visible channels */
+    ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
+	
+	/* now, only keep the ones that are of the types we are interested in */
+	for (ale = anim_data.first; ale; ale = ale_next) {
+		ale_next = ale->next;
+		
+		if (ale->type != type)
+			BLI_freelinkN(&anim_data, ale);
+	}
+	
+	/* return cleaned up list */
+	*anim_data_visible = anim_data;
 }
 
 /* performing rearranging of channels using islands */
@@ -950,10 +964,6 @@ static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, short mode)
 	if (rearrange_func == NULL)
 		return;
 	
-	/* only consider NLA data if it's accessible */
-	//if (EXPANDED_DRVD(adt) == 0)
-	//	return;
-	
 	/* Filter visible data. */
 	rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_NLATRACK);




More information about the Bf-blender-cvs mailing list