Script for add stereo 3D adjust fx and more

relaxvideo wrote on 6/11/2017, 3:32 PM

After pairing L-R clips, i alway add stereo 3D fx, press "Corrections" triangle and hit and the "Auto correct" button.

Very time consuming for project with many events. Is it possible to make a script for this and call with hotkey?

I use V11 and V12.

thanks a lot

Comments

altarvic wrote on 6/13/2017, 4:53 AM

Take a look at Vegasaur's Stereoscopic 3D

relaxvideo wrote on 6/13/2017, 5:15 AM

thx, i search a free script file

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

relaxvideo wrote on 9/27/2017, 2:02 AM

also is there an easy way to pair 2 selected event for 3D? a hotkey? right mouse click and search the command is not fast.

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

Wolfgang S. wrote on 9/27/2017, 9:00 AM

After pairing L-R clips, i alway add stereo 3D fx, press "Corrections" triangle and hit and the "Auto correct" button.

Very time consuming for project with many events. Is it possible to make a script for this and call with hotkey?

I use V11 and V12.

thanks a lot


You can apply the stereoscopic plugin at the track Level, after you have finished your cutting, and work with keyframes.

Another way would be to copy the Event Attributes and paste it to all the other Events. BUT you still have to open the plugin and edit the stereoscopic Settings.

From my experience with s3D I cannot imagine that a full automatisation makes a lot of sense - since you have to adjust the disparity anyway from take to take in most cases.

Desktop: PC AMD 3960X, 24x3,8 Mhz * RTX 3080 Ti (12 GB)* Blackmagic Extreme 4K 12G * QNAP Max8 10 Gb Lan * Resolve Studio 18 * Edius X* Blackmagic Pocket 6K/6K Pro, EVA1, FS7

Laptop: ProArt Studiobook 16 OLED * internal HDR preview * i9 12900H with i-GPU Iris XE * 32 GB Ram) * Geforce RTX 3070 TI 8GB * internal HDR preview on the laptop monitor * Blackmagic Ultrastudio 4K mini

HDR monitor: ProArt Monitor PA32 UCG-K 1600 nits, Atomos Sumo

Others: Edius NX (Canopus NX)-card in an old XP-System. Edius 4.6 and other systems

Wolfgang S. wrote on 9/27/2017, 9:02 AM

also is there an easy way to pair 2 selected event for 3D? a hotkey? right mouse click and search the command is not fast.


If the footage is mvc footage from cameras like the TD10/20/30 or the Z10K, this footage is imported paired if you Import it when you have s3D Settings in the project settings.

If you shoot with two cameras, sorry to say so: but then you have to pair it manually.

The trick can be that you arrange all your Clips in the timeline in two tracks - mark the total number of Clips; and pair them in the next step. Not sure if that works, I have not the footage here - but give that a try.

Desktop: PC AMD 3960X, 24x3,8 Mhz * RTX 3080 Ti (12 GB)* Blackmagic Extreme 4K 12G * QNAP Max8 10 Gb Lan * Resolve Studio 18 * Edius X* Blackmagic Pocket 6K/6K Pro, EVA1, FS7

Laptop: ProArt Studiobook 16 OLED * internal HDR preview * i9 12900H with i-GPU Iris XE * 32 GB Ram) * Geforce RTX 3070 TI 8GB * internal HDR preview on the laptop monitor * Blackmagic Ultrastudio 4K mini

HDR monitor: ProArt Monitor PA32 UCG-K 1600 nits, Atomos Sumo

Others: Edius NX (Canopus NX)-card in an old XP-System. Edius 4.6 and other systems

relaxvideo wrote on 9/27/2017, 9:10 AM

Yes, we already taked about track fx before, but no, i dont want to play with keyframes. My editing workflow cannot allow this.. I dont want a full automatisation, just want to eliminate pressing the triangle and hit "auto correct".

Of course footage from 3D camcorders are paired automatically. I work in 3D since 2008 :)
I asked about 2 cam setup. For many command we can have a script, why we can't for pairing for 3D?

 

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

Wolfgang S. wrote on 9/27/2017, 9:47 AM

But have you tried to organize - for example - 15 Events in the timeline, in two tracks; and pair them all together? That would bring up the Performance as first step.

And if you wish to use "Auto correct" - do that. But that could be done also if you apply the fx as track effect, enable keyframes, navigate to the beginning of the Event, all the time the fx window open - and use there the Auto correction function. That would bring up your workflow Performance again, because you do not have to open the fx window for every Event - you open it ones and set your keyframes.

Both steps will also work for a two camera Setup.

Desktop: PC AMD 3960X, 24x3,8 Mhz * RTX 3080 Ti (12 GB)* Blackmagic Extreme 4K 12G * QNAP Max8 10 Gb Lan * Resolve Studio 18 * Edius X* Blackmagic Pocket 6K/6K Pro, EVA1, FS7

Laptop: ProArt Studiobook 16 OLED * internal HDR preview * i9 12900H with i-GPU Iris XE * 32 GB Ram) * Geforce RTX 3070 TI 8GB * internal HDR preview on the laptop monitor * Blackmagic Ultrastudio 4K mini

HDR monitor: ProArt Monitor PA32 UCG-K 1600 nits, Atomos Sumo

Others: Edius NX (Canopus NX)-card in an old XP-System. Edius 4.6 and other systems

3d87c4 wrote on 9/27/2017, 8:33 PM

FWIW: For my GoPro dive videos I auto correct a representative surface clip, then copy and paste attributes to apply the resulting 3D adjustments to the underwater clips. Later, I review and adjust the convergence on a clip-by-clip basis.

This assumes the camera alignment doesn't change during the dive. Vegas can't auto correct underwater footage.

Vegas used to be able to automatically pair 3D gopro footage, but the file numbering scheme changed with the Hero 3+ cameras and Vegas pairs them out of sync, even if the file numbers are corrected. I have to put the raw clips into separate directories to keep Vegas from auto-pairing them. Manual pairing works fine, though.

 

Last changed by 3d87c4 on 9/27/2017, 8:37 PM, changed a total of 1 times.

Del XPS 17 laptop

Processor    13th Gen Intel(R) Core(TM) i9-13900H   2.60 GHz
Installed RAM    32.0 GB (31.7 GB usable)
System type    64-bit operating system, x64-based processor
Pen and touch    Touch support with 10 touch points

Edition    Windows 11 Pro
Version    22H2
Installed on    ‎6/‎8/‎2023
OS build    22621.1848
Experience    Windows Feature Experience Pack 1000.22642.1000.0

NVIDIA GeForce RTX 4070 Laptop GPU
Driver Version: 31.0.15.2857
8GB memory
 

relaxvideo wrote on 9/27/2017, 11:43 PM

thx

i also copy and paste attributes sometimes, when i dont change camera orientation, zoom, etc. But thats a rare case.

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

relaxvideo wrote on 7/18/2020, 4:04 AM

This question still interest me. Any script?

Sure, Vegasaur can do this, but the price is too much for this function.

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

relaxvideo wrote on 7/8/2025, 9:22 AM

Still impossible in Vegas22? :)

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

jetdv wrote on 7/8/2025, 5:31 PM

@relaxvideo you can do it yourself. Here's a tutorial that shows how to add an effect to an event. Just change the effect added to the effect you want added.

Then here's a tutorial showing how you can change the effect tutorials:

It might also help to watch some of the other tutorials around these two which show how to get the parameter names, and effect names, for example.

relaxvideo wrote on 7/9/2025, 4:40 AM

Thanks jetdv,

so (hopefully) something changed since you wrote this in another topic in 2018?

No, that is not possible. It can add the FX but cannot "press a specific button"

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

jetdv wrote on 7/9/2025, 8:11 AM

You can try this:

relaxvideo wrote on 7/9/2025, 9:06 AM

Thanks, tried with no luck.
Vegas drop an error message:

The „evnt” name doesn't appear/occur in this environment.

I am a beginner in scripting :)
Please help, my .cs code was:

using System;
using System.IO;
using System.Text;
using ScriptPortal.Vegas;

public class EntryPoint
{
    Vegas myVegas;
    
    public void Main(Vegas vegas)
    {
       myVegas = vegas;    
     
       VideoEvent vEvent = (VideoEvent)evnt;

                        foreach(Effect effect in vEvent.Effects)
                        {
                            if (effect.PlugIn.Name == "Stereoscopic 3D Adjust")
                            {
                                if (effect.PlugIn.IsOFX)
                                {
                                    OFXEffect ofx = effect.OFXEffect;
                                    foreach (OFXParameter ofxparm in ofx.Parameters)
                                    {
                                        if (ofxparm.ParameterType.ToString() == "PushButton" && ofxparm.Name == "Auto correct")
                                        {
                                            ofxparm.ParameterChanged();
                                        }
                                    }
                                }
                            }
                        }                 
                           

    }
    
}


#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

zzzzzz9125 wrote on 7/9/2025, 10:40 AM

I am a beginner in scripting :)

@relaxvideo Then you might need to start learning the script from scratch.

 

Anyway, here's one that works:

using ScriptPortal.Vegas;

namespace Test
{
    public class TestClass
    {
        public Vegas myVegas;
        public const string UID_3D_ADJUST = "{Svfx:com.vegascreativesoftware:Filters.Stereoscopic3DAdjust}";
        public const string UID_3D_ADJUST_SONY = "{Svfx:com.sonycreativesoftware:Filters.Stereoscopic3DAdjust}";
        public void Main(Vegas vegas)
        {
            myVegas = vegas;

            PlugInNode plug3DAdjust = myVegas.VideoFX.FindChildByUniqueID(UID_3D_ADJUST) ?? myVegas.VideoFX.FindChildByUniqueID(UID_3D_ADJUST_SONY);

            if (plug3DAdjust == null)
            {
                myVegas.ShowError("PlugIn Not Found.");
                return;
            }

            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                if (myTrack.IsVideo())
                {
                    foreach (TrackEvent ev in myTrack.Events)
                    {
                        if (ev.Selected)
                        {
                            VideoEvent vEvent = ev as VideoEvent;
                            foreach (Effect ef in vEvent.Effects)
                            {
                                if (ef.PlugIn.IsOFX && ef.PlugIn.UniqueID == plug3DAdjust.UniqueID)
                                {
                                    OFXEffect ofx = ef.OFXEffect;
                                    foreach (OFXParameter ofxparm in ofx.Parameters)
                                    {
                                        if (ofxparm.ParameterType.ToString() == "PushButton" && ofxparm.Name == "AutoAlignButton")
                                        {
                                            ofxparm.ParameterChanged();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

public class EntryPoint
{
    public void FromVegas(Vegas vegas)
    {
        Test.TestClass test = new Test.TestClass();
        test.Main(vegas);
    }
}

There're some basic methods, such as getting selected events from the current project through two "foreach", which you need to keep in mind.

If you are writing a general script, you'd better not use strings affected by the local language (Effect.PlugIn.Name, OFXParameter.Label, etc.). Instead, switch to unchanging strings (Effect.PlugIn.UniqueID, OFXParameter.Name, etc.). Your "Auto correct" is an OFXParameter.Label affected by the local language. Besides, you might want to ask where "{Svfx:com.vegascreativesoftware:Filters.Stereoscopic3DAdjust}" and "AutoAlignButton" came from. My approach is to directly search from the OFX language files, such as "C:\Program Files\VEGAS\VEGAS Pro 22.0\OFX Video Plug-Ins\Filters.ofx.bundle\Contents\Resources\Filters.xml". You can find many infos about OFX plugins that comes with VEGAS Pro here.

 

I also found that in higher versions (I'm not sure which one, but I can make it work in VP22), you can use:

if (ofxparm is OFXPushButtonParameter && ofxparm.Name == "AutoAlignButton")
{
    OFXPushButtonParameter pushButton = ofxparm as OFXPushButtonParameter;
    pushButton.Trigger();
}

Last changed by zzzzzz9125 on 7/9/2025, 10:50 AM, 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

relaxvideo wrote on 7/9/2025, 11:01 AM

Wow, what a different script, with different names.

It would take 2 days to me to figure this out :)

Thank you, it works!

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest

3d87c4 wrote on 7/9/2025, 12:16 PM

Keep in mind the auto adjust does not adjust the horizontal alignment.

Del XPS 17 laptop

Processor    13th Gen Intel(R) Core(TM) i9-13900H   2.60 GHz
Installed RAM    32.0 GB (31.7 GB usable)
System type    64-bit operating system, x64-based processor
Pen and touch    Touch support with 10 touch points

Edition    Windows 11 Pro
Version    22H2
Installed on    ‎6/‎8/‎2023
OS build    22621.1848
Experience    Windows Feature Experience Pack 1000.22642.1000.0

NVIDIA GeForce RTX 4070 Laptop GPU
Driver Version: 31.0.15.2857
8GB memory
 

jetdv wrote on 7/9/2025, 1:52 PM

I often just get OFX Effect, go through the list of parameters, and display the "Label" and "Name" to determine the internal name of the parameter I'm looking for. Sometimes they match, Often they don't, and occasionally they're so different I'd have never guessed what it was.

relaxvideo wrote on 7/9/2025, 1:58 PM

Keep in mind the auto adjust does not adjust the horizontal alignment.

Yes, i'm aware of this since used auto correct since many years :)

#1 Ryzen 5-1600, 16GB DDR4, Nvidia 1660 Super, M2-SSD, Acer freesync monitor

#2 i7-2600, 32GB, Nvidia 1660Ti, SSD for system, M2-SSD for work, 2x4TB hdd, LG 3D monitor +3DTV +3D projectors

Win10 x64, Vegas22 latest