www.jetdv.com Forum Index Edward Troxel
Vegas Scripting and Newsletters
Home of Excalibur and Montage Magic
 
 FAQ   Search   Memberlist   Usergroups   Register   Profile 
 Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting a list of plug-in presets in a script?

 
Post new topic   Reply to topic    www.jetdv.com Forum Index -> Scripting FAQ
View previous topic :: View next topic  
Author Message
Feathers



Joined: 09 Mar 2006
Posts: 8

PostPosted: Mon Mar 13, 2006 9:56 pm    Post subject: Getting a list of plug-in presets in a script? Reply with quote

A new week, a new question... ^_^

My scripting project here requires custom presets in two plug-ins in Vegas. For elegant error-trapping purposes, I'd like to find out if those presets at least exist and are named correctly. But I cannot for the life of me figure out how to get a list of preset names for a given plug-in.

The closest I've gotten is vSharp.Presets.Count, which returns the number of presets in the collection. Where vSharp points to the Sony Sharpen effect. If I could get an enumerated list of names that I could step through with .moveNext(), life would be good.

I throw myself at the mercy of the forum!

James

P.S. This is the correct sub-board to put questions, right? If there is a better place, let me know and I'll start posting there. I can guarentee you I'll have another question in a day or two. And as always, I appriciate any and all help.
Back to top
View user's profile Send private message
Edward Troxel
Site Admin


Joined: 14 Jul 2004
Posts: 5475

PostPosted: Mon Mar 13, 2006 10:10 pm    Post subject: Reply with quote

You need to do something like this (NOTE: This is C# code but the principle is the same in JScript!)

This routine will go through all video FX available in Vegas, display the FX names, and display the available presets for each FX.

Code:
foreach (PlugInNode fx in VegasInfo.Vegas.VideoFX)
{
      MessageBox.Show(fx.Name);
      foreach (EffectPreset mypreset in fx.Presets)
      {
            try
            {
                  MessageBox.Show(mypreset.Name);
            }
            catch
            {
            }
      }
}
Back to top
View user's profile Send private message Send e-mail
Feathers



Joined: 09 Mar 2006
Posts: 8

PostPosted: Mon Mar 13, 2006 11:15 pm    Post subject: Reply with quote

Edward Troxel wrote:
You need to do something like this (NOTE: This is C# code but the principle is the same in JScript!)

Beautiful! I adapted it, tested it and put it into my script. It's exactly what I needed. Thank you very much, once again.

James
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.jetdv.com Forum Index -> Scripting FAQ All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.11 © 2001, 2002 phpBB Group