Based on the thousands of times I've added a 15 frame fade to events this summer, I would like to try this script. I changed the import statement correctly for each version of Vegas, but then I get a message about the time code variable that I don't understand.
P.S.
I wish the script was credited to an individual in the comments.
Here's a .cs version modified from one of @jetdv's that I hope he doesn't mind me posting:
/**
* This script will add a one second Fade In and out to all selected events.
*
* Written By: Edward Troxel
* Copyright 2016 - JETDV Scripts
* Modified: 08-26-2016
* Converted to .CS and new Vegas namespace
*
* 10-18-2018 - Version to fade in and out by 500ms by Nick Hope
*
**/
using System;
using ScriptPortal.Vegas;public class EntryPoint
{
Vegas myVegas;
public void FromVegas(Vegas vegas)
{
myVegas = vegas;
foreach (Track track in myVegas.Project.Tracks)
{
foreach (TrackEvent trackEvent in track.Events)
{
if (trackEvent.Selected)
{
trackEvent.FadeIn.Length = new Timecode(500);
trackEvent.FadeOut.Length = new Timecode(500);
}
}
}
}
}
Thanks Nick. The thought occurred to me while I was out this evening doing electrical work for free that if one wants to run a Java script, then one ought to have Java loaded on the machine. This machine does not, but one of my other machines does.
Your altered script added a 15 frame fade out. I added this line to also Fade In.
Thought you only wanted a fade out, but no idea why I thought that. I'll put that line back in the script above.
I guessed that whatever required Java is included with Vegas, but maybe you're right. Haven't heard of that problem before, but I guess most just install Java at some point on the PCs.