You can use the ReplaceWith method of the Media object. For example:
for (int i = 0; i < listOfProxyMedia.Count; i++) {
Media proxy = listOfProxyMedia.GetItem(i);
Media fullRez = listOfFullRezMedia.GetItem(i);
proxy.ReplaceWith(fullRez);
}
Cor blimey (mate), there I was wondering how to do the same thing and the answer popped up. Moochas Gracias!
I would like to make a media multiple replacement script working on the basis of a few sets of corresponding files (e.g. hi res, lo res, deinterlaced, various attempts at color grading for comparison) . This would assist the various standard and experimental workflows that I use in practice, replacing everything manually.
The corresponding files might be in different folders (might not), might have prefixes or suffixes wrt the original files (might not). Ideally (is this practical?) allow a look-up table (eg text CSV made in Excel or by Batch file) of equivalences where the field names (first row) were used as basis for a select-list in the script GUI and the row entries could be path\file names with optional patterns like wildcards (hence catering for folders, prefixes etc).
The corresponding files might have different formats e.g. interlaced, progressive, double or single framerate, but always the same aspect ratio. Would like to make the script set the media properties (as seen by Vegas) to the same aspect ratio as the original media - to get round issues with some codecs eg HuffYuv where Vegas defaults to something different (so then you have to remember to alter media properties for the umpteenth time... or forget and have to re-render... etc.).
Anyone already thought this through, done this :-) know of a good starting-point or or want to collaborate ?