Vegas has a great feature, namely the ability to "paste event attributes." You can use this to quickly take all fX on one event and apply them to another event.
Unfortunately, when you paste, Vegas adds these fX to any that are already in existence for that event. This is usually what you want EXCEPT when you have already applied another instance of the same fX. In this case, you end up with a double-whammy, with the same fX acting twice on the same event. Perhaps this is what some people wanted, but it sure isn't what I want. In my workflow, I often end up with two Color Corrector, or multiple copies of the Levels fX, and then wonder why the video looks so odd. What's really bad is that sometimes my color corrections are subtle, and I don't notice the problem right away.
Sooo ...
I wrote another "auditing" script, which if it "sells" as fast as my last one, will be used by at least five people by the end of the century. However, if it helps even one poor soul, perhaps it was worth the time to post it. Since the last few scripts didn't generate any interest, I'm not going to bother to upload it anywhere.
Unfortunately, when you paste, Vegas adds these fX to any that are already in existence for that event. This is usually what you want EXCEPT when you have already applied another instance of the same fX. In this case, you end up with a double-whammy, with the same fX acting twice on the same event. Perhaps this is what some people wanted, but it sure isn't what I want. In my workflow, I often end up with two Color Corrector, or multiple copies of the Levels fX, and then wonder why the video looks so odd. What's really bad is that sometimes my color corrections are subtle, and I don't notice the problem right away.
Sooo ...
I wrote another "auditing" script, which if it "sells" as fast as my last one, will be used by at least five people by the end of the century. However, if it helps even one poor soul, perhaps it was worth the time to post it. Since the last few scripts didn't generate any interest, I'm not going to bother to upload it anywhere.
/**
* This script will find and highlight all video events
* that contain more than one instance of the same fX.
* It also puts a marker at the start of each such event.
* You can then remove the duplicate fX if you did not intend
* to apply the same fX to the same event more than once.
*
* This only works on video tracks. You must select a track
* before running the script.
*
* If a marker already exists at the beginning of an event, no
* marker will be added. However, the event will be selected, so
* you will still be able to see which events need to be fixed.
*
* Written By: John Meyer
* 8-29-2006
**/
import System;
import System.Text;
import System.IO;
import System.Windows.Forms;
import Sony.Vegas;
var myMarker : Marker;
try {
var track = FindSelectedTrack(); //Use this function to find the first selected track.
//Go through the list of Events
var eventEnum = new Enumerator(track.Events);
var evnt : TrackEvent = TrackEvent(eventEnum.item());
if ( evnt.IsVideo() ) { // Only operate on video events
while (!eventEnum.atEnd()) {
evnt = TrackEvent(eventEnum.item());
evnt.Selected = false; // De-select the event
var videoEvent = VideoEvent(evnt);
var stopit = 0;
if (videoEvent.Effects.Count>1) {
for (var i=videoEvent.Effects.Count -1; i >= 0; i--) {
var effect = videoEvent.Effects[i];
for (var j=i-1; j >= 0; j--) {
var duptest = videoEvent.Effects[j];
if (effect.PlugIn.Name==duptest.PlugIn.Name) {
evnt.Selected = true; // Select the event
if (!MarkerExist(evnt.Start.ToMilliseconds()) ) {
myMarker = new Marker(evnt.Start);
Vegas.Project.Markers.Add(myMarker);
myMarker.Label = "*** "+effect.PlugIn.Name;
}
stopit = 1;
break;
} // End if (effect == duptest)
} // End for j
if (stopit == 1) {
break;
}
} // End for i
} // End if (i>1)
eventEnum.moveNext();
} // End while (!eventEnum.atEnd())
} // End if ( evnt.IsVideo() )
Vegas.UpdateUI();
} catch (e) {
MessageBox.Show(e);
}
function FindSelectedTrack() : Track {
var trackEnum = new Enumerator(Vegas.Project.Tracks);
while (!trackEnum.atEnd()) {
var track : Track = Track(trackEnum.item());
if (track.Selected) {
return track;
}
trackEnum.moveNext();
}
return null;
}
function MarkerExist (dStart) : boolean {
var markerEnum = new Enumerator(Vegas.Project.Markers);
while (!markerEnum.atEnd()) {
myMarker = markerEnum.item(); // myMarker is a global function in this project
var MarkerStart = myMarker.Position.ToMilliseconds();
if ( dStart == MarkerStart ) {
return 1;
}
markerEnum.moveNext();
} // End while markerEnum
return 0;
}