Comments

GaryKleiner wrote on 10/6/2003, 9:44 AM
To rename an event, right-click on the media and rename from properties.

Gary
Grazie wrote on 10/6/2003, 9:56 AM
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 . . .

Grazie
Udi wrote on 10/6/2003, 11:26 AM
Here is a simple script that will rename all clips to the media file name.

/**
* rename all media clips to the file name
**/

import System;
import System.Windows.Forms;
import SonicFoundry.Vegas;

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);
}
Grazie wrote on 10/6/2003, 11:44 AM
Udi , thanks . . couple of questions:

1 - Will this then put the New Name into the t/l?

2 - So, if I've got files called 1.avi; 2.avi; 3.avi will they ALL get called NEWname.avi? - Isn't this disaster?

I did read this script in Sundance - I think - and thought, hmmm . . I can't be correct . ? . . .

Thanks - your feedback is sought. Sorry if I sound dense about this, but I'd like to know what I'm getting into.

Grazie