-
Unattached Object, Automatic Fade In/Out
Posted by Tyson Onaga on March 4, 2009 at 11:35 pmIs there a command to add a Fade In/Out to a selected media object. Let’s say the object does NOT overlap another object in the track. I would like a (e.g. 2 second) Fade In/Out applied to the object without having to use the “drag Fade handle approach” on each end of the object. I.e., select the object and menu-command (or hot keys) and the fades are applied.
Thanks in advance.
– TysonJohn Rofrano replied 17 years, 2 months ago 3 Members · 4 Replies -
4 Replies
-
Mike Kujbida
March 5, 2009 at 1:11 amThere’s a script on the VASST site Fade Event In Out that’s close to what you need.
It was written for a 1 second fade in/out but it shouldn’t be too hard to modify it for a 2 sec. fade. -
Tyson Onaga
March 11, 2009 at 4:10 pmThanks for the tip. You wouldn’t happen to have the Script file? I think I found it here:
https://www.vasst.com/index.php?option=com_content&view=article&id=860:fadeeventinout&catid=55:vasstfreeware&Itemid=98
but when I try to download it, I get SharesAndSurfaces.sfpreset which looks like a binary file, not a text script file.
Regards,
– Tyson -
Mike Kujbida
March 11, 2009 at 4:16 pm[Tyson Onaga] “…when I try to download it, I get SharesAndSurfaces.sfpreset…”
Very strange 🙁
DSE or John Rofrano, could one of you look into this please.In the meantime, here’s the script (thanks to John Rofrano).
Save it as FadeEventInOut.js/**
* Program: FadeEventInOut.js
* Description: This script will add a 1 second fade both ends of the current event
* Author: Johnny (Roy) Rofrano john_rofrano@hotmail.com
*
* Revision Date: June 7, 2003
**/import Sony.Vegas;
import System.Windows.Forms;
import Microsoft.Win32;try
{
var evnt = FindSelectedEvent();
if (evnt == null)
{
throw “Error: You must select an Event.”;
}
evnt.FadeIn.Length = new Timecode(1000);
evnt.FadeOut.Length = new Timecode(1000);
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, “Error”, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}/**
* Finds the currently selected event. Searches all tracks and returns the first
* even that is selected or null if no event is selected
* (Taken from the Sony.MediaSoftware Scripting FAQ)
*/
function FindSelectedEvent() : TrackEvent
{
var trackEnum = new Enumerator(Vegas.Project.Tracks);
while (!trackEnum.atEnd())
{
var track : Track = Track(trackEnum.item());
var eventEnum = new Enumerator(track.Events);
while (!eventEnum.atEnd())
{
var evnt : TrackEvent = TrackEvent(eventEnum.item());
if (evnt.Selected)
{
return evnt;
}
eventEnum.moveNext();
}
trackEnum.moveNext();
}
return null;
} -
John Rofrano
March 12, 2009 at 3:03 am> DSE or John Rofrano, could one of you look into this please.
Yea, that’s definitely a misguided link. I’ll tell our web folks about it. Thanks,
~jr
http://www.johnrofrano.com
http://www.vasst.com
Reply to this Discussion! Login or Sign Up