Hiyah Gary! Yes I know that wheeze . . I'm talking about having say 50 clips, which have been replaced and where I choose to have the NEW name appear after I've replaced it. After all the file path is in the details list; the New name appears in the Details list; the New media is on the T/L - why then doesn't the New Name appear too in the T/L! Seems obvious to me. 50 clips to rename through Media Properties ? When Vegas has got all the info it needs already? Gary, this doesn't stack up . . .
try {
var trackEnum = new Enumerator(Vegas.Project.Tracks);
while(!trackEnum.atEnd()) {
var track = trackEnum.item();
var eventEnum = new Enumerator(track.Events);
while(!eventEnum.atEnd()) {
var ev : TrackEvent = TrackEvent(eventEnum.item());
var take = ev.ActiveTake;
var path = take.MediaPath;
var i = path.LastIndexOf("\\");
if(i > 0) {
take.Name = path.Substring(i+1);
}
eventEnum.moveNext();
}
trackEnum.moveNext();
}
} catch (e) {
MessageBox.Show(e);
}