comparison Add Dynamics.cs @ 4:d32ae6be32a4

*: mass rename files committer: GitHub <noreply@github.com>
author Paper <37962225+mrpapersonic@users.noreply.github.com>
date Mon, 23 Jan 2023 23:35:06 -0500
parents add_dynamics.cs@32af787f8cb8
children 6dcd5eef9c97
comparison
equal deleted inserted replaced
3:958615460fe5 4:d32ae6be32a4
1 #define VER_GEQ_14 // remove this for vegas 13
2 #if VER_GEQ_14
3 using ScriptPortal.Vegas;
4 #else
5 using Sony.Vegas;
6 #endif
7 using System.Windows.Forms;
8
9 public class EntryPoint {
10 string DynamicsID = "{00000008-0F56-11D2-9887-00A0C969725B}";
11 public void FromVegas(Vegas vegas) {
12 foreach (PlugInNode plugin in vegas.AudioFX) {
13 if (plugin.Name == "ExpressFX Dynamics" && plugin.UniqueID == DynamicsID) {
14 foreach (Track track in vegas.Project.Tracks) {
15 foreach (TrackEvent trackEvent in track.Events) {
16 if (trackEvent.Selected && trackEvent.IsAudio()) {
17 AudioEvent audio = trackEvent as AudioEvent;
18 foreach (Effect effect in audio.Effects) {
19 if (effect.PlugIn.UniqueID == DynamicsID) {
20 audio.Effects.Remove(effect);
21 }
22 }
23 Effect DynamicsPlugin = audio.Effects.AddEffect(plugin);
24 foreach (Preset preset in DynamicsPlugin.Presets) {
25 if (preset.Name == "preset") {
26 DynamicsPlugin.CurrentPreset = preset;
27 }
28 }
29 }
30 }
31 }
32 }
33 }
34 }
35 }