how to set effect preset via script? Pete Siamidis wrote on 9/26/2012, 6:04 PM Quick question, I have a script that sets a video fx like Brightness and Contrast to a video clip, but how do I set the preset via script? The effect object has .Preset and .CurrentPreset members which I set but they don't seem to have any effect. Back to post
Comments jetdv wrote on 9/27/2012, 11:31 AM Here's and example that will add a blur effect using the "Medium Blur" preset to an event. string plugInName = "Sony Gaussian Blur"; string presetName = "Meduim Blur"; PlugInNode fx = Vegas.VideoFX; PlugInNode plugIn = fx.GetChildByName(plugInName); Effect effect = new Effect(plugIn); videoEvent.Effects.Add(effect); if (null != presetName) { effect.Preset = presetName; } Pete Siamidis wrote on 9/27/2012, 1:05 PM Thanks, looks like my issue was that I was setting the preset before I was adding the effect to the video event. So I was doing: effect.Preset = presetName; videoEvent.Effects.Add(effect); ...which apparently doesn't work. I flipped those around and now it works, thanks! 1