Comments

jetdv wrote on 1/10/2005, 6:11 PM
This one will set the undersample rate to .75. Adjust the script as needed.


/**
* This script will set the UnderSampleRate for all selected events.
*
* Written By: Edward Troxel
* Copyright 2005 - JETDV Scripts
* Modified: 01-10-2005
**/

import System;
import System.IO;
import System.Windows.Forms;
import Sony.Vegas;


try {

//Go through the list of Tracks
var trackEnum = new Enumerator(Vegas.Project.Tracks);
while (!trackEnum.atEnd()) {
var track : Track = Track(trackEnum.item());

//Go through the list of Events
var eventEnum = new Enumerator(track.Events);
while (!eventEnum.atEnd()) {
var evnt : TrackEvent = TrackEvent(eventEnum.item());

if (evnt.Selected) {

var ve : VideoEvent = VideoEvent(evnt);
ve.UnderSampleRate = .75;

}
eventEnum.moveNext();
}
trackEnum.moveNext();
}


} catch (e) {
MessageBox.Show(e);
}
Spot|DSE wrote on 1/10/2005, 6:42 PM
Nice one, Edward...one I'll use a lot. Never thought about a script for this before.
bluevm wrote on 1/11/2005, 6:40 AM
Thanks a lot...very usefull