Comments

jetdv wrote on 8/22/2008, 1:17 PM
Excalibur can easily extend the length by your amount but extending the beginning is only one clip at a time. I have this one which will trim the front and back:

/**
* This script will trim the front and back for all selected events.
*
* Written By: Edward Troxel
* Copyright 2004 - JETDV Scripts
* Modified: 08-03-2005
**/

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


var trimAmt = new Timecode("00:00:01:00");


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 dStart = evnt.Start + trimAmt;
var dLength = evnt.Length;

//Get current take offset
var tke = evnt.ActiveTake;
var tkeoffset = tke.Offset;
tkeoffset = tkeoffset + trimAmt;
evnt.Start = dStart;
tke.Offset = tkeoffset;

dLength = dLength - trimAmt - trimAmt;
evnt.Length = new Timecode(dLength);
}
eventEnum.moveNext();
}
trackEnum.moveNext();
}


} catch (e) {
MessageBox.Show(e);
}


Change the var trimAmt = new Timecode("00:00:01:00"); line to read:
var trimAmt = new Timecode("-00:00:00:15");

That will change it to 15 frames and by making it a negative time, it should extend instead of trim.
Marc S wrote on 8/22/2008, 1:50 PM
Edward,

Thank you very much. You have just saved me a lot of time.

Marc