Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums VEGAS Pro Script to Add VideoFX Preset to Clip

  • Script to Add VideoFX Preset to Clip

    Posted by Frankie Jones on July 30, 2015 at 5:51 pm

    Hey,
    Is there a script anybody knows of (no clue how to write my own), that you can click to apply a videofx sony levels preset to selected clips. I realise you can set the preset on one clip and then paste attributes, but I wondered if the script way was possible.
    Thanks!

    Edward Troxel replied 10 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Edward Troxel

    July 31, 2015 at 11:05 pm

    You can use this as a base. Just change the effect name and the preset name as desired. This one was named “BWEffect.js”

    /**
    * This script will add the B&W effect to all selected events.
    *
    * Written By: Edward Troxel
    * Copyright 2004 – JETDV Scripts
    * Modified: 10-01-2004
    **/

    import System;
    import System.IO;
    import System.Windows.Forms;
    import Sony.Vegas;

    try {

    //Go through the list of Tracks
    var trackEnum = new Enumerator(Vegas.Project.Tracks);
    while (!trackEnum.atEnd()) {
    var track : Track = Track(trackEnum.item());

    //Go through the list of Events
    var eventEnum = new Enumerator(track.Events);
    while (!eventEnum.atEnd()) {
    var evnt : TrackEvent = TrackEvent(eventEnum.item());

    if (evnt.Selected) {

    var ve : VideoEvent = VideoEvent(evnt);

    var plugInName = “Sony Black and White”;
    var presetName = “100% Black and White”;
    var fx = Vegas.VideoFX;
    var plugIn = fx.GetChildByName(plugInName);

    var effect = new Effect(plugIn);
    ve.Effects.Add(effect);
    if (null != presetName) {
    effect.Preset = presetName;
    }

    }
    eventEnum.moveNext();
    }
    trackEnum.moveNext();
    }

    } catch (e) {
    MessageBox.Show(e);
    }

    Edward Troxel

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy