Is there a way via the script language to change the source file name of a clip? I know how to create a new clip from a file, but I can't seem to figure out how to access/change the file name of an existing clip. Am I overlooking it?
I wasn't clear. I don't want to change the name of the file on the disk. I know how to do that. I want to change the name of the file(s) that Vegas loads for clips.
Specifically, when I get ready to archive a project that I 'probably' won't have to rebuild again, but want to keep around just in case, I do a batch render of all the AVI files to mpg. But the project file is looking for .avi files. I know I can manually go through the process the next time I load the project of telling vegas the new name of every clip, but that's a pain when I have 100+ separate clips from different files in a project. I'd just like to write a script that would go through and find all references to .AVI files and tell vegas to now look for the .mpg filename version.
Vegas 5 has a Media.ReplaceWith(Media other) method that should do the trick.
For Vegas 4, it looks to be a bit more difficult. You would have to create a new Media object for your mpg files, then go through all of the TrackEvents, and create a new Take for each event that references the correct MediaStream from the new media object and add this Take to the TrackEvent. Then you would remove the old Take.
I haven't tried this, but in looking at the API it looks like this should work.