From ae4db7eb5929ae51f362faeb39fb04e4bf22005f Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 2 Feb 2013 05:38:57 +0000 Subject: Bugfix: "Extend" transform tool would leave dangling "temp meta strips" if none of those strips occurred on the same side of CFRA indicator as the mouse --- source/blender/editors/transform/transform_conversions.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/transform') diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 39c51ff456e..7d62775ae58 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2642,6 +2642,14 @@ static void createTransNlaData(bContext *C, TransInfo *t) /* stop if trying to build list if nothing selected */ if (count == 0) { + /* clear temp metas that may have been created but aren't needed now + * because they fell on the wrong side of CFRA + */ + for (ale = anim_data.first; ale; ale = ale->next) { + NlaTrack *nlt = (NlaTrack *)ale->data; + BKE_nlastrips_clear_metas(&nlt->strips, 0, 1); + } + /* cleanup temp list */ BLI_freelistN(&anim_data); return; @@ -2686,14 +2694,14 @@ static void createTransNlaData(bContext *C, TransInfo *t) tdn->oldTrack = tdn->nlt = nlt; tdn->strip = strip; tdn->trackIndex = BLI_findindex(&adt->nla_tracks, nlt); - + yval = (float)(tdn->trackIndex * NLACHANNEL_STEP(snla)); - + tdn->h1[0] = strip->start; tdn->h1[1] = yval; tdn->h2[0] = strip->end; tdn->h2[1] = yval; - + center[0] = (float)CFRA; center[1] = yval; center[2] = 0.0f; -- cgit v1.2.3