Comments

JohnnyRoy wrote on 3/27/2005, 7:59 PM
This script will do what you want. Just uncomment the field order you would like to set everything to and comment out the other two. It is currently set for Lower Field First. Just cut and paste it into a file called: ChangeMediaPoolFieldOrder.js
/**
* Program: ChangeMediaPoolFieldOrder.js
* Description: This script will change the field order of all the video media in
* the project's media pool
* Author: Johnny (Roy) Rofrano john_rofano at hotmail dot com
*
* Date: March 27, 2005
*
**/

import System.Windows.Forms;
import Sony.Vegas;

//
// Uncomment the field order you want to set
//
//var fieldOrder : VideoFieldOrder = VideoFieldOrder.ProgressiveScan;
//var fieldOrder : VideoFieldOrder = VideoFieldOrder.UpperFieldFirst;
var fieldOrder : VideoFieldOrder = VideoFieldOrder.LowerFieldFirst;

var counter = 0;
try
{
for (var media in Vegas.Project.MediaPool)
{
// only change if the media object has a video stream.
if (media.HasVideo())
{
// get the video stream
var video : VideoStream = media.Streams.GetItemByMediaType(MediaType.Video,0);
// Set the field order
video.FieldOrder = fieldOrder;
counter++;
}
}
MessageBox.Show(counter + " Video stream(s) processed.");
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
/** END OF SCRIPT **/
~jr