|
|||||||||
|
Thread Tools | Search this Thread |
April 1st, 2007, 04:08 PM | #1 |
Regular Crew
Join Date: Feb 2005
Location: Sofia Bulgaria
Posts: 147
|
Vegas Script For Field Order?
Hi there,
I am looking for a script to change the field order of all footages on the timeline (footage - properties - field order), i.e. from lower to progressive. |
April 1st, 2007, 09:58 PM | #2 |
Sponsor: JET DV
Join Date: Dec 2001
Location: Southern Illinois
Posts: 7,953
|
Try this one. Save the following as ChangeFieldOrder.cs
Code:
/** * This script will set the field order * * Written By: Edward Troxel * Modified: 04-01-2007 **/ using System; using System.IO; using System.Text; using System.Drawing; using System.Reflection; using System.Diagnostics; using System.Windows.Forms; using System.Runtime.InteropServices; using Sony.Vegas; public class EntryPoint { Vegas myVegas; public void FromVegas(Vegas vegas) { myVegas = vegas; foreach (Track track in myVegas.Project.Tracks) { foreach(TrackEvent evnt in track.Events) { VideoFieldOrder FType = VideoFieldOrder.ProgressiveScan; //VideoFieldOrder.LowerFieldFirst; // VideoFieldOrder.UpperFieldFirst; // VideoFieldOrder.ProgressiveScan; // VideoFieldOrder.Unknown; MediaStream mediaStream = GetActiveMediaStream (evnt, myVegas); VideoStream videoStream = mediaStream as VideoStream; videoStream.FieldOrder = FType; } } } public MediaStream GetActiveMediaStream (TrackEvent trackEvent, Vegas vegas) { try { if (!(trackEvent.ActiveTake.IsValid())) { throw new ArgumentException("empty or invalid take"); } Media media = vegas.Project.MediaPool.Find(trackEvent.ActiveTake.MediaPath); if (null == media) { MessageBox.Show("missing media"); throw new ArgumentException("missing media"); } MediaStream mediaStream = media.Streams.GetItemByMediaType(MediaType.Video, trackEvent.ActiveTake.StreamIndex); return mediaStream; } catch (Exception e) { MessageBox.Show("{0}", e.Message); return null; } } } Excalibur will also easily do this particular task if you don't want to mess with the above.
__________________
Edward Troxel [SCVU] JETDV Scripts/Scripting Tutorials/Excalibur/Montage Magic/Newsletters |
| ||||||
|
|