-
ApplyTransitions.js – Apply crossfades to SELECTED events only?
Posted by Jill Simpson on April 11, 2009 at 3:26 amI have the script from https://www.jetdv.com/scripts/ApplyTransV5.js. Can it be modified to apply crossfades to SELECTED events only?
Edward Troxel replied 17 years ago 3 Members · 2 Replies -
2 Replies
-
Graham Bernard
April 11, 2009 at 7:16 amYou want to make a selections of Events to Crossfade – move over each other – by using a script? Is that it? Well, as I have Excalibur I can utilize his “Gap/Overlap” script as part of Edward Troxel’s (jetdv) Excalibur package. Maybe this is only available within Excalibur, Jill? As to can it be modified for your requirements, I’d be calling the Author – in this case Edward T? Edward is very helpful. Try a free download of Excalbur too!
You would also be advised to download Johnny Rofrano’s UltimateS Pro 4, he – jr – provides much support on these boards. Johnny has a feature rich set of tools for Event fades and L and J cuts – it is just stacked with options.
Grazie
-
Edward Troxel
April 11, 2009 at 2:19 pmBasically, you would need to take this section:
while (!eventEnum.atEnd()) {
var ev = eventEnum.item();ev.FadeIn.Curve = CurveType.Slow
if (bRandom) {
num = int(Math.random() * totalTrans + 1);
if (num > 23) {
num = totalTrans - 1;
}
plugIn = Vegas.Transitions.GetChild(int(num));
}var startTime = ev.Start.ToMilliseconds();
var length = ev.Length.ToMilliseconds();startTime = ev.Start - startoffset;
if (startTime.ToMilliseconds() < 0) {
startTime = new Timecode("00:00:00:00");
startoffset = startoffset - overlapTime;
}var currTake = ev.ActiveTake;
var currOffset = currTake.Offset;
ev.Start = startTime;
currTake.Offset = currOffset;Vegas.UpdateUI();
if(ev.MediaType == MediaType.Video && !bFade) {
fx = new Effect(plugIn);
ev.FadeIn.Transition = fx;
}eventEnum.moveNext();
startoffset = startoffset + overlapTime;
}and add the code to ONLY affect selected events such as:
while (!eventEnum.atEnd()) {
var ev = eventEnum.item();if (ev.Selected) {
ev.FadeIn.Curve = CurveType.Slow
if (bRandom) {
num = int(Math.random() * totalTrans + 1);
if (num > 23) {
num = totalTrans - 1;
}
plugIn = Vegas.Transitions.GetChild(int(num));
}var startTime = ev.Start.ToMilliseconds();
var length = ev.Length.ToMilliseconds();startTime = ev.Start - startoffset;
if (startTime.ToMilliseconds() < 0) {
startTime = new Timecode("00:00:00:00");
startoffset = startoffset - overlapTime;
}var currTake = ev.ActiveTake;
var currOffset = currTake.Offset;
ev.Start = startTime;
currTake.Offset = currOffset;Vegas.UpdateUI();
if(ev.MediaType == MediaType.Video && !bFade) {
fx = new Effect(plugIn);
ev.FadeIn.Transition = fx;
}eventEnum.moveNext();
startoffset = startoffset + overlapTime;
}
}To be honest, you’d probably be better off by ONLY letting it affect a selected TRACK instead. To do that, you would but this around the highlighted code above:
if (tr.Selected) {(put the While (!trackEnum.atEnd... loop listed above here)
}
Reply to this Discussion! Login or Sign Up
