I need a shifting script

Sebaz wrote on 7/22/2009, 5:14 PM
Hello,

I have a two frame sync problem in a multicam track that it's taking me a lot of time to fix because I'm zooming in all the events for the affected camera until I get to the frame level, pressing Alt and moving two frames to the left.

Is there a way to make this faster with a script, if I select all the affected events and apply a script that shifts two frames to the left? Note that I'm not talking about shifting the event in the timeline, but shifting the source media inside the event, without moving the event boundaries.

I'm using Vegas Pro 8.0c

Thanks

Comments

Rosebud wrote on 7/23/2009, 2:33 AM
Try this one (save it with a .cs extension):

using System;
using Sony.Vegas;
public class EntryPoint
{
Vegas myVegas;
public void FromVegas(Vegas vegas)
{
myVegas = vegas;
Timecode tcToAdd = new Timecode("00:00:00;02");

foreach (Track track in myVegas.Project.Tracks)
foreach (TrackEvent evnt in track.Events)
if (evnt.Selected)
evnt.ActiveTake.Offset += tcToAdd;
}
}


Change the tcToAdd value as desired.
Sebaz wrote on 7/23/2009, 4:02 PM
Works perfect! Thank you very much!