Where do I find the Video FX documentation for Scripting?

amendegw wrote on 10/4/2024, 3:11 PM

Some background... some 13 years ago, I was fairly active in Vegas Scripting but not written one line of code since then. Therefore, I've forgotten most of what I'd learned. I'm using Microsoft Copilot to write some code for me... getting me started, then I'm modifying it for my use.

I'm attempting to write a script that will move the Vegas timeline cursor to the "Reference Frame Number" returned by the builtin "Video Stabilization" FX. Is there any documentation that for the Vegas FXs?

Here's the modified code that Microsoft CoPilot wrote for me. Doesn't work. I modified the code to change the "Reference Frame Number" to "Static Reference" - still doesn't work.

So, my question is, "How can I get a script to return the Video Stabilization 'Reference Frame Number'? Better yet... where is the documentation for all Vegas FX?

Thanks in Advance,

...Jerry

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

Comments

zzzzzz9125 wrote on 10/4/2024, 6:50 PM

A common way to do this is to use the MessageBox to display the names of all the parameters for the FX, such as:

foreach (OFXParameter para in ofxEffect.Parameters)
{
    MessageBox.Show(para.Label + ": " + para.Name);
}

This outputs the labels and names of all parameters, one to one.

 

However, for OFX plugins that come with Vegas, you can find their localization files, which is my favorite way. For the Video Stabilization, it should be located at: C:\Program Files\VEGAS\VEGAS Pro 22.0\OFX Video Plug-Ins\MagixCVFx.ofx.bundle\Contents\Resources\MagixCVFx.xml. VEGAS Pro 22.0 folder depends on your VEGAS Pro installation location, while MagixCVFx.ofx.bundle and MagixCVFx.xml depend on the specific plugin. We can find all the information about this FX.

You will find that your mistake is not in the "StaticReference", but in the "Video Stabilization". In your code, to tell if it's a Video Stabilization, you should use:

if (effect.PlugIn.Name  == "VEGAS Video Stabilization")

However, in cases where the UniqueID is known, it's recommended that you do not use the name of FX but the UniqueID as a judgment. The Name will relate to your localized text, but the UniqueID will not. Use:

if (effect.PlugIn.UniqueID == "{Svfx:de.magix:Stabilize}")

The UniqueID here can also be found in xml.

Last changed by zzzzzz9125 on 10/4/2024, 6:52 PM, changed a total of 1 times.

Using VEGAS Pro 22 build 248 & VEGAS Pro 21 build 208.

Information about my PC:
Brand Name: HP VICTUS Laptop
System: Windows 11.0 (64-bit) 10.00.22631
CPU: 12th Gen Intel(R) Core(TM) i7-12700H
GPU: NVIDIA GeForce RTX 3050 Laptop GPU
GPU Driver: NVIDIA Studio Driver 560.70

jetdv wrote on 10/4/2024, 7:03 PM

@amendegw go through my tutorials:

The tutorials and descriptions will list where you can find the scripting API. Plus, you can get the script that writes out all of the GUID's for all effects you have installed so you can properly find them.

amendegw wrote on 10/5/2024, 8:01 AM

Thanks. @jetdv. You're tutorials are excellent. I started down the path of using Visual Studio but installed VS 2022 and got lost because it didn't follow your tutorial (i.e. couldn't find "references" in Solution Explorer?). That said, I uninstalled and installed VS 2015 and now I'm in familiar territory... matches you tutorial and is a familiar user interface to what I used several years ago.

So... I'm not in a huge hurry to finish this. I'll be back in a few days - either with "success!" or more questions.

Thanks again,
...Jerry

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9