Si correcto, en mi versión 21 funciona a la perfección y me va a ser muy util!
Aqui está el codigo:
Aqui está el codigo:
Código [Seleccionar]
using System;
using ScriptPortal.Vegas;
using System.Windows.Forms;
using System.IO;public class EntryPoint
{
public static Vegas myVegas;
public void FromVegas(Vegas vegas)
{
myVegas = vegas;
try
{
foreach (var track in myVegas.Project.Tracks)
{
//check if track is video or not selected
if (track.IsVideo()) continue;
if (!track.Selected) continue;
//remove existing track compressor fx
for (int i = track.Effects.Count - 1; i >= 0; i--)
{
var ef = track.Effects[i];
if (ef.PlugIn.ClassID.ToString() == "23c9f225-40ec-11d2-9d36-00c04f8edc1e")
{
track.Effects.Remove(ef);
}
}
//add new track compressor fx and set preset
PlugInNode plug = myVegas.AudioFX.GetChildByClassID(new Guid("23c9f225-40ec-11d2-9d36-00c04f8edc1e"));
Effect eff = new Effect(plug);
track.Effects.Add(eff);
eff.Preset = eff.Presets[2].Name;
//update vegas ui
myVegas.UpdateUI();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}