I've been using the script below to create sub clips from events.
I would like to alter the script to name the sub clips with existing makers names.
I've searched various forums thinking I could hack something together but,
I'm clueless when it comes to scripting. Any help or a push in the right direction would be most appreciated.
//******************************************
import System.Windows.Forms;
import Sony.Vegas;
var trackEnum = new Enumerator(Vegas.Project.Tracks);
var track : Track = Track(trackEnum.item());
var eventEnum = new Enumerator(track.Events);
var evnt : TrackEvent = TrackEvent(eventEnum.item());
var path = evnt.ActiveTake.MediaPath;
var markerEnum = new Enumerator(Vegas.Project.Markers);
var firstMarker = markerEnum.item();
markerEnum.moveNext();
var lastMarker = markerEnum.item();
var idSubclip = 1;
try
{
while (!markerEnum.atEnd()) {
var mySubclip = new Subclip (path, firstMarker.Position, lastMarker.Position -
firstMarker.Position, false, "Subclip "+idSubclip);
firstMarker = lastMarker;
markerEnum.moveNext();
lastMarker = markerEnum.item();
idSubclip++;
}
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
//******************************************
thanks,
Bruce
I would like to alter the script to name the sub clips with existing makers names.
I've searched various forums thinking I could hack something together but,
I'm clueless when it comes to scripting. Any help or a push in the right direction would be most appreciated.
//******************************************
import System.Windows.Forms;
import Sony.Vegas;
var trackEnum = new Enumerator(Vegas.Project.Tracks);
var track : Track = Track(trackEnum.item());
var eventEnum = new Enumerator(track.Events);
var evnt : TrackEvent = TrackEvent(eventEnum.item());
var path = evnt.ActiveTake.MediaPath;
var markerEnum = new Enumerator(Vegas.Project.Markers);
var firstMarker = markerEnum.item();
markerEnum.moveNext();
var lastMarker = markerEnum.item();
var idSubclip = 1;
try
{
while (!markerEnum.atEnd()) {
var mySubclip = new Subclip (path, firstMarker.Position, lastMarker.Position -
firstMarker.Position, false, "Subclip "+idSubclip);
firstMarker = lastMarker;
markerEnum.moveNext();
lastMarker = markerEnum.item();
idSubclip++;
}
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
//******************************************
thanks,
Bruce