VP20 - Bulk Enabling Keyframes

Sean-K wrote on 1/30/2024, 9:36 AM

I'm looking for insight on whether it's possible to select/enable all keys within an effect at once vs. needing to manually select all individually. I've done it manually in years past, but have always wondered if there was a more efficient method to the process (when needed).

Vegas Pro - 20.0 Build 411

w/Boris FX Continuum Plug-ins for OFX 2023 v16.0.0.848

Windows 11 PC w/ EVGA GeForce RTX 3080 12GB FTW3

Comments

vkmast wrote on 1/30/2024, 9:50 AM

@Sean-K first, update to the last build # 411 of VEGAS Pro 20. Please see e.g. here.

jetdv wrote on 1/30/2024, 9:57 AM

@Sean-K, Secondly, upload the picture here instead of on another website.

Sean-K wrote on 1/30/2024, 9:59 AM

First and Secondly are now completed.

jetdv wrote on 1/30/2024, 10:24 AM
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(VideoEvent vEvent in myTrack.Events)
                    {
                        if (vEvent.Selected)
                        {
                            foreach(Effect eff in vEvent.Effects)
                            {
                                if (eff.IsOFX)
                                {
                                    OFXEffect Oeff = eff.OFXEffect;
                                    foreach(OFXParameter OParm in Oeff.Parameters)
                                    {
                                        if (OParm.CanAnimate)
                                        {
                                            OParm.IsAnimated = true;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

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

Just save the above as "Animate All Paramaters.cs" and run the script to turn on animation for all parameters that can be animated on each OFX effect added to each selected event.

Before

After

If you need more information about scripts and where to put them:

Sean-K wrote on 1/30/2024, 11:10 AM
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(VideoEvent vEvent in myTrack.Events)
                    {
                        if (vEvent.Selected)
                        {
                            foreach(Effect eff in vEvent.Effects)
                            {
                                if (eff.IsOFX)
                                {
                                    OFXEffect Oeff = eff.OFXEffect;
                                    foreach(OFXParameter OParm in Oeff.Parameters)
                                    {
                                        if (OParm.CanAnimate)
                                        {
                                            OParm.IsAnimated = true;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

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

Just save the above as "Animate All Paramaters.cs" and run the script to turn on animation for all parameters that can be animated on each OFX effect added to each selected event.

Before

After

If you need more information about scripts and where to put them:

Fantastic, thank you for the information!