[Bf-blender-cvs] [6ef7e0a] master: Bugfix: Stashed actions now get added to the bottom of the NLA Stack if there weren't any stashed actions already
Joshua Leung
noreply at git.blender.org
Fri Apr 3 14:41:25 CEST 2015
Commit: 6ef7e0a194b4eac66d110b601a807dd5bf4921ab
Author: Joshua Leung
Date: Sat Apr 4 01:12:32 2015 +1300
Branches: master
https://developer.blender.org/rB6ef7e0a194b4eac66d110b601a807dd5bf4921ab
Bugfix: Stashed actions now get added to the bottom of the NLA Stack if there weren't any stashed actions already
===================================================================
M source/blender/blenkernel/intern/nla.c
===================================================================
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 9a04312..c87f378 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -1584,6 +1584,12 @@ bool BKE_nla_action_stash(AnimData *adt)
nlt = add_nlatrack(adt, prev_track);
BLI_assert(nlt != NULL);
+ /* we need to ensure that if there wasn't any previous instance, it must go to tbe bottom of the stack */
+ if (prev_track == NULL) {
+ BLI_remlink(&adt->nla_tracks, nlt);
+ BLI_addhead(&adt->nla_tracks, nlt);
+ }
+
BLI_strncpy(nlt->name, STASH_TRACK_NAME, sizeof(nlt->name));
BLI_uniquename(&adt->nla_tracks, nlt, STASH_TRACK_NAME, '.', offsetof(NlaTrack, name), sizeof(nlt->name));
More information about the Bf-blender-cvs
mailing list