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>2010-11-11 13:27:24 +0300
committerJoshua Leung <aligorith@gmail.com>2010-11-11 13:27:24 +0300
commit98e98bf5d20f5ef0344acbb384a0cd632b10a6f2 (patch)
treee1bc95c5913c71cfb185836fa62d4890d9b706e6 /source/blender/editors/transform/transform_conversions.c
parente3db157074cf8da508cde24b313acb6520194b93 (diff)
Bugfix #24621: NLA strips move insensitively across tracks
This was a 2-part bug: 1) "Track index" (i.e. "index of NLA track within NLA Stack") was calculated incorrectly when the transform data is created. A typo meant that this was actually "index of strip within original track" 2) Strips were flying around madly vertically (especially for downward movements, and with extreme difficulty for upwards) as the track index was being updated incorrectly. I suspect at the time I was misreading it as trackIndex = ... vs trackIndex += ..., though it obviously looked wrong looking at it now!
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r--source/blender/editors/transform/transform_conversions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index da68f7abc4e..e0324ae60bd 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2662,6 +2662,7 @@ static void createTransNlaData(bContext *C, TransInfo *t)
for (ale= anim_data.first; ale; ale= ale->next) {
/* only if a real NLA-track */
if (ale->type == ANIMTYPE_NLATRACK) {
+ AnimData *adt = ale->adt;
NlaTrack *nlt= (NlaTrack *)ale->data;
NlaStrip *strip;
@@ -2686,7 +2687,7 @@ static void createTransNlaData(bContext *C, TransInfo *t)
tdn->id= ale->id;
tdn->oldTrack= tdn->nlt= nlt;
tdn->strip= strip;
- tdn->trackIndex= BLI_findindex(&nlt->strips, strip);
+ tdn->trackIndex= BLI_findindex(&adt->nla_tracks, nlt);
yval= (float)(tdn->trackIndex * NLACHANNEL_STEP);