diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-11-11 13:27:24 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-11-11 13:27:24 +0300 |
commit | 98e98bf5d20f5ef0344acbb384a0cd632b10a6f2 (patch) | |
tree | e1bc95c5913c71cfb185836fa62d4890d9b706e6 /source/blender/editors/transform/transform_generics.c | |
parent | e3db157074cf8da508cde24b313acb6520194b93 (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_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 22888a6b007..dd3e4698ef5 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -582,7 +582,7 @@ void recalcData(TransInfo *t) BKE_nlatrack_add_strip(track, strip); tdn->nlt= track; - tdn->trackIndex += (n + 1); /* + 1, since n==0 would mean that we didn't change track */ + tdn->trackIndex++; } else /* can't move any further */ break; @@ -600,7 +600,7 @@ void recalcData(TransInfo *t) BKE_nlatrack_add_strip(track, strip); tdn->nlt= track; - tdn->trackIndex -= (n - 1); /* - 1, since n==0 would mean that we didn't change track */ + tdn->trackIndex--; } else /* can't move any further */ break; |