Equalize Histogram setting in White Balance FX

Comments

3POINT wrote on 1/30/2025, 9:59 AM

So, @3POINT, you mention a script?? 😁

I just got a message from @jetdv that he has no objections for publishing his autolevel script, so here we go:

using System;
using System.Collections.Generic;
using System.Collections;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using System.Drawing;
using System.Runtime;
using System.Xml;
using ScriptPortal.Vegas;

namespace Test_Script
{
    public class Class1
    {
        public Vegas myVegas;

        public void Main(Vegas vegas)
        {
            myVegas = vegas;

            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                if (myTrack.IsVideo())
                {
                    foreach (TrackEvent evnt in myTrack.Events)
                    {
                        if (evnt.Selected)
                        {
                            VideoEvent vEvnt = (VideoEvent)evnt;

                            string plugInUID = "{Svfx:com.vegascreativesoftware:colorgrading}";
                            PlugInNode fx = myVegas.VideoFX;
                            PlugInNode plugIn = fx.GetChildByUniqueID(plugInUID);

                            Effect effect = new Effect(plugIn);
                            vEvnt.Effects.Add(effect);

                            OFXEffect ofx = effect.OFXEffect;
                            OFXIntegerParameter p2 = (OFXIntegerParameter)ofx["AutoAdjust"];
                            p2.Value = 1;
                            p2.ParameterChanged(OFXParameter.DISABLE_MEDIA_CLOSE);
                        }
                    }
                }
            }
        }
    }
}

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

 

J-Toresen wrote on 1/30/2025, 10:04 AM

I wish you a great trip through Spain, my second favorite destination.

Jøran

Reyfox wrote on 1/30/2025, 10:43 AM

@3POINT thanks! @jetdv thank you too!

Newbie😁

Vegas Pro 22 (VP18-21 also installed)

Win 11 Pro always updated

AMD Ryzen 9 5950X 16 cores / 32 threads

32GB DDR4 3200

Sapphire RX6700XT 12GB Driver: 25.3.2

Gigabyte X570 Elite Motherboard

Panasonic G9, G7, FZ300

MikeLV wrote on 1/31/2025, 5:46 PM

So, @3POINT, you mention a script?? 😁

I just got a message from @jetdv that he has no objections for publishing his autolevel script, so here we go:

using System;
using System.Collections.Generic;
using System.Collections;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using System.Drawing;
using System.Runtime;
using System.Xml;
using ScriptPortal.Vegas;

namespace Test_Script
{
    public class Class1
    {
        public Vegas myVegas;

        public void Main(Vegas vegas)
        {
            myVegas = vegas;

            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                if (myTrack.IsVideo())
                {
                    foreach (TrackEvent evnt in myTrack.Events)
                    {
                        if (evnt.Selected)
                        {
                            VideoEvent vEvnt = (VideoEvent)evnt;

                            string plugInUID = "{Svfx:com.vegascreativesoftware:colorgrading}";
                            PlugInNode fx = myVegas.VideoFX;
                            PlugInNode plugIn = fx.GetChildByUniqueID(plugInUID);

                            Effect effect = new Effect(plugIn);
                            vEvnt.Effects.Add(effect);

                            OFXEffect ofx = effect.OFXEffect;
                            OFXIntegerParameter p2 = (OFXIntegerParameter)ofx["AutoAdjust"];
                            p2.Value = 1;
                            p2.ParameterChanged(OFXParameter.DISABLE_MEDIA_CLOSE);
                        }
                    }
                }
            }
        }
    }
}

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

 

Regarding this script, what should the file name an extension be? And what exactly does it do?

3POINT wrote on 1/31/2025, 11:54 PM

You can copy the script text into Notepad and save it as autolevel.txt into the script folder of your Vegas program folder. Then change the extension of the autolevel.txt in autolevel.cs, after rescanning script folder or after restarting Vegas the autolevel script will show up under Tools/scripts.

What it does, after running the script, all selected video events on the timeline will be auto color level corrected. Depending on how many events this will take a few seconds.

Also you can assign the script to a button on the Vegas toolbar, auto color leveling of selected events will than be done with a single mouse click.

Last changed by 3POINT on 2/1/2025, 12:00 AM, changed a total of 1 times.

3POINT, Theo Houben, Vegasuser since version 5 and co-founder and moderator of the Dutch Vegasforum https://www.vegas-videoforum.nl/index.php

Recware: DJI Osmo Pocket/Mavic Mini, GoproHero7Black, PanasonicFZ300/HCX909.

Software: Vegaspro365+Vegasaur, PowerDirector365, Davinci Resolve 20

Hardware: i910900k, 32GB, GTX2080super, 2x1920x1200 display

Playware: Samsung Qled QE65Q6FN

Reyfox wrote on 2/1/2025, 4:34 AM

I added it yesterday. Thanks!

Newbie😁

Vegas Pro 22 (VP18-21 also installed)

Win 11 Pro always updated

AMD Ryzen 9 5950X 16 cores / 32 threads

32GB DDR4 3200

Sapphire RX6700XT 12GB Driver: 25.3.2

Gigabyte X570 Elite Motherboard

Panasonic G9, G7, FZ300

3POINT wrote on 2/1/2025, 5:54 AM

I added it yesterday. Thanks!

And does it work as promised? With this script no need to dive into the color grading panel for each event.

Reyfox wrote on 2/1/2025, 6:05 AM

Yep! Just depends on the overall event that it is being applied.

Newbie😁

Vegas Pro 22 (VP18-21 also installed)

Win 11 Pro always updated

AMD Ryzen 9 5950X 16 cores / 32 threads

32GB DDR4 3200

Sapphire RX6700XT 12GB Driver: 25.3.2

Gigabyte X570 Elite Motherboard

Panasonic G9, G7, FZ300

MikeLV wrote on 2/1/2025, 12:54 PM

Thank you I look forward to trying it as I hate trying to do color correction, I'm never satisfied with the result

MikeLV wrote on 2/11/2025, 4:11 PM

So, @3POINT, you mention a script?? 😁

I just got a message from @jetdv that he has no objections for publishing his autolevel script, so here we go:

using System;
using System.Collections.Generic;
using System.Collections;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using System.Drawing;
using System.Runtime;
using System.Xml;
using ScriptPortal.Vegas;

namespace Test_Script
{
    public class Class1
    {
        public Vegas myVegas;

        public void Main(Vegas vegas)
        {
            myVegas = vegas;

            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                if (myTrack.IsVideo())
                {
                    foreach (TrackEvent evnt in myTrack.Events)
                    {
                        if (evnt.Selected)
                        {
                            VideoEvent vEvnt = (VideoEvent)evnt;

                            string plugInUID = "{Svfx:com.vegascreativesoftware:colorgrading}";
                            PlugInNode fx = myVegas.VideoFX;
                            PlugInNode plugIn = fx.GetChildByUniqueID(plugInUID);

                            Effect effect = new Effect(plugIn);
                            vEvnt.Effects.Add(effect);

                            OFXEffect ofx = effect.OFXEffect;
                            OFXIntegerParameter p2 = (OFXIntegerParameter)ofx["AutoAdjust"];
                            p2.Value = 1;
                            p2.ParameterChanged(OFXParameter.DISABLE_MEDIA_CLOSE);
                        }
                    }
                }
            }
        }
    }
}

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

 

Is the script you shared the same as this: https://tools4vegas.com/auto-color-grading/ ?

Reyfox wrote on 2/12/2025, 4:53 AM

It isn't the same script.

Newbie😁

Vegas Pro 22 (VP18-21 also installed)

Win 11 Pro always updated

AMD Ryzen 9 5950X 16 cores / 32 threads

32GB DDR4 3200

Sapphire RX6700XT 12GB Driver: 25.3.2

Gigabyte X570 Elite Motherboard

Panasonic G9, G7, FZ300

MikeLV wrote on 3/5/2025, 2:34 PM

@3POINT wow, that script actually worked, and did a very nice job auto color correcting; thank you so much for sharing it with us.

3POINT wrote on 3/5/2025, 3:18 PM

@3POINT wow, that script actually worked, and did a very nice job auto color correcting; thank you so much for sharing it with us.

You're welcome.