Skip to content

Instantly share code, notes, and snippets.

@guillaC
Created December 22, 2021 21:51
Show Gist options
  • Save guillaC/e9a8894281e116a6e956302b92a3d1ea to your computer and use it in GitHub Desktop.
Save guillaC/e9a8894281e116a6e956302b92a3d1ea to your computer and use it in GitHub Desktop.
Fiverr Order #FO6166BF3AA84
namespace ReduceNoiseAll
{
using System;
using ScriptPortal.Vegas;
using System.Windows.Forms;
using System.Collections.Generic;
public class EntryPoint
{
public void FromVegas(Vegas vegas)
{
Project proj = vegas.Project;
PlugInNode fx = vegas.VideoFX;
String effectName = "Reduce Noise v5";
String effectUniqueID = "";
foreach (PlugInNode plugin in fx)
{
if (plugin.Name == effectName)
{
effectUniqueID = new Effect(plugin).PlugIn.UniqueID;
continue;
}
}
if (effectUniqueID == "")
{
MessageBox.Show(effectName + " not found.");
return;
}
foreach (Track track in proj.Tracks)
{
if (track.IsVideo())
{
foreach (TrackEvent trackEvent in track.Events)
{
if (trackEvent.IsVideo())
{
VideoEvent video = (VideoEvent)trackEvent;
PlugInNode plugin = fx.GetChildByUniqueID(effectUniqueID);
video.Effects.AddEffect(plugin);
video.Effects[video.Effects.Count - 1].Preset = "Test";
}
}
}
}
MessageBox.Show("Done.");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment