Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2015-04-03 15:12:32 +0300
committerJoshua Leung <aligorith@gmail.com>2015-04-03 15:40:00 +0300
commit6ef7e0a194b4eac66d110b601a807dd5bf4921ab (patch)
treeed014d54bf124a4eb99f2243e29e6f47664e1574 /source/blender/blenkernel/intern/nla.c
parentb30836dad742f4f6c72e0b5b58cf1abe2fcef09d (diff)
Bugfix: Stashed actions now get added to the bottom of the NLA Stack if there weren't any stashed actions already
Diffstat (limited to 'source/blender/blenkernel/intern/nla.c')
-rw-r--r--source/blender/blenkernel/intern/nla.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 9a04312aaab..c87f378d5ae 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));