Created
December 22, 2021 21:51
-
-
Save guillaC/e9a8894281e116a6e956302b92a3d1ea to your computer and use it in GitHub Desktop.
Fiverr Order #FO6166BF3AA84
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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