📝⚙️(Script) Make a "ladder" with events

m3lquixd wrote on 2/5/2024, 7:21 AM

I need a script that organizes the events like a "ladder", I would like it to have a menu so I can choose what the frame interval is between each event and what the order of the events will be, whether it is from bottom to top or top to bottom.

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

Comments

m3lquixd wrote on 2/5/2024, 7:22 AM

@jetdv Are you available for this?

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

jetdv wrote on 2/5/2024, 11:14 AM

@m3lquixd, either method would be fairly easy to do. But there needs to be some answers:

  1. Process every track? Process only selected tracks?
  2. Process every event? Process only selected events?
  3. Two different scripts for top moves over vs bottom moves over?
  4. How far over is each event moved relative to the others? In your example video, it was 5 frames. Is that a constant?

In other words, how do we locate the events to move? Do we need to do any checking that they all start at the same point? Does it need a form to indicate top move vs bottom move? How far to move events? Anything else?

m3lquixd wrote on 2/5/2024, 12:10 PM

@jetdv In the example I did it with 5 frames, but I thought of a script that had a menu for the user to enter how many frames they want. And choose whether the movement would be from top to bottom or bottom to top. The idea would be to have a single script, but if that's not possible, it could be one to do from top to bottom and one to do from bottom to top. But the part about typing how many frames the user wants to move would be essential. And yes, it would only be on the events that were selected, ONLY the events that were selected. Even if there are other events on the same tracks. As for checking if they are at the same point, I don't think it's necessary... Because if, for example, I moved 5 frames apart in each one, and I wanted to move 2 MORE frames, I would just need to apply it again. (Ideally, events remain selected after script execution) However, I believe it would be more difficult to create a script that moves regardless of whether the events are aligned. So if it's not possible. It may just be when the events are aligned anyway. So as not to give you trouble. Because if they are aligned, just follow the logic I did in the example video. I don't know... I would like it to be independent of whether the events are aligned.

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

zzzzzz9125 wrote on 2/5/2024, 10:59 PM

https://github.com/delthas/vegas-datamosh

I think what you need is the Layer script from Vegas datamosh

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

m3lquixd wrote on 2/5/2024, 11:18 PM

@zzzzzz9125 I downloaded it here, it doesn't seem to work

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

m3lquixd wrote on 2/8/2024, 2:24 PM

@jetdv Any news?

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

jetdv wrote on 2/8/2024, 3:02 PM

I haven't even had time to begin looking at this. The other one I posted today took maybe 2 minutes. This one isn't a 2 minute script.

m3lquixd wrote on 2/8/2024, 3:04 PM

Oh I understand perfectly, I was worried that you left this aside. haha

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

jetdv wrote on 2/9/2024, 11:59 AM

@m3lquixd see if this is what you're wanting.
 

using System;
using System.IO;
using System.Windows.Forms;
using ScriptPortal.Vegas;

namespace Test_Script_With_Form
{
    public partial class Form1 : Form
    {
        public Vegas myVegas;


        public Form1(Vegas vegas)
        {
            myVegas = vegas;
            InitializeComponent();
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            int FirstTrack = 0;
            int LastTrack = myVegas.Project.Tracks.Count;
            int adder = 1;

            Timecode SingleDistance = Timecode.FromString(txtDistanceTC.Text);

            if (cmbDirection.Text.ToLower() == "up")
            {
                FirstTrack = LastTrack - 1;
                LastTrack = -1;
                adder = -1;
            }

            Timecode MoveDistance = Timecode.FromSeconds(0);
            for (int i=FirstTrack; i != LastTrack; i = i + adder)
            {
                Track myTrack = myVegas.Project.Tracks[i];
                bool foundOne = false;
                foreach(TrackEvent evnt in myTrack.Events)
                {
                    if (evnt.Selected)
                    {
                        evnt.Start = evnt.Start + (MoveDistance);
                        foundOne = true;
                    }
                }
                if (foundOne)
                {
                    MoveDistance = MoveDistance + SingleDistance;
                }
            }

            Close();
        }



        private void buttonCancel_Click(object sender, EventArgs e)
        {
            Close();
        }


        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.buttonOK = new System.Windows.Forms.Button();
            this.buttonCancel = new System.Windows.Forms.Button();
            this.txtDistanceTC = new System.Windows.Forms.TextBox();
            this.labelSignalBelow = new System.Windows.Forms.Label();
            this.labelMinDuration = new System.Windows.Forms.Label();
            this.cmbDirection = new System.Windows.Forms.ComboBox();
            this.SuspendLayout();
            //
            // buttonOK
            //
            this.buttonOK.Location = new System.Drawing.Point(73, 77);
            this.buttonOK.Margin = new System.Windows.Forms.Padding(2);
            this.buttonOK.Name = "buttonOK";
            this.buttonOK.Size = new System.Drawing.Size(75, 23);
            this.buttonOK.TabIndex = 2;
            this.buttonOK.Text = "OK";
            this.buttonOK.UseVisualStyleBackColor = true;
            this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
            //
            // buttonCancel
            //
            this.buttonCancel.Location = new System.Drawing.Point(217, 77);
            this.buttonCancel.Name = "buttonCancel";
            this.buttonCancel.Size = new System.Drawing.Size(75, 23);
            this.buttonCancel.TabIndex = 3;
            this.buttonCancel.Text = "Cancel";
            this.buttonCancel.UseVisualStyleBackColor = true;
            this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
            //
            // txtDistanceTC
            //
            this.txtDistanceTC.Location = new System.Drawing.Point(217, 33);
            this.txtDistanceTC.Name = "txtDistanceTC";
            this.txtDistanceTC.Size = new System.Drawing.Size(100, 20);
            this.txtDistanceTC.TabIndex = 5;
            this.txtDistanceTC.Text = "00:00:02:00";
            //
            // labelSignalBelow
            //
            this.labelSignalBelow.AutoSize = true;
            this.labelSignalBelow.Location = new System.Drawing.Point(10, 11);
            this.labelSignalBelow.Name = "labelSignalBelow";
            this.labelSignalBelow.Size = new System.Drawing.Size(49, 13);
            this.labelSignalBelow.TabIndex = 7;
            this.labelSignalBelow.Text = "Direction";
            //
            // labelMinDuration
            //
            this.labelMinDuration.AutoSize = true;
            this.labelMinDuration.Location = new System.Drawing.Point(214, 11);
            this.labelMinDuration.Name = "labelMinDuration";
            this.labelMinDuration.Size = new System.Drawing.Size(49, 13);
            this.labelMinDuration.TabIndex = 8;
            this.labelMinDuration.Text = "Distance";
            //
            // cmbDirection
            //
            this.cmbDirection.FormattingEnabled = true;
            this.cmbDirection.Items.AddRange(new object[] {
            "Up",
            "Down"});
            this.cmbDirection.Location = new System.Drawing.Point(13, 33);
            this.cmbDirection.MaxDropDownItems = 2;
            this.cmbDirection.Name = "cmbDirection";
            this.cmbDirection.Size = new System.Drawing.Size(121, 21);
            this.cmbDirection.TabIndex = 9;
            this.cmbDirection.Text = "Down";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(384, 112);
            this.Controls.Add(this.cmbDirection);
            this.Controls.Add(this.labelMinDuration);
            this.Controls.Add(this.labelSignalBelow);
            this.Controls.Add(this.txtDistanceTC);
            this.Controls.Add(this.buttonCancel);
            this.Controls.Add(this.buttonOK);
            this.Margin = new System.Windows.Forms.Padding(2);
            this.Name = "Form1";
            this.Text = "Ladder Stairstep Events";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion
        private System.Windows.Forms.Button buttonOK;
        private System.Windows.Forms.Button buttonCancel;
        private System.Windows.Forms.TextBox txtDistanceTC;
        private System.Windows.Forms.Label labelSignalBelow;
        private System.Windows.Forms.Label labelMinDuration;
        private System.Windows.Forms.ComboBox cmbDirection;
    }
}

public class EntryPoint
{
    private static Test_Script_With_Form.Form1 form;

    public void FromVegas(Vegas vegas)
    {
        form = new Test_Script_With_Form.Form1(vegas);
        form.ShowDialog();
    }
}

 

m3lquixd wrote on 2/9/2024, 12:28 PM

Is there a limit to how many events I can select?

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

jetdv wrote on 2/9/2024, 12:45 PM

Shouldn't be. Every event on the track will be processed the same.

m3lquixd wrote on 2/9/2024, 12:49 PM

Perfect, you are amazing! Thank you very much!

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 7 5700G 3.80 GHz
RAM:
    32,0GB Dual-Channel DDR4 3200MHz
Motherboard:
    ASRock B450M Steel Legend (AM4)
Graphics:
    MSI RTX 4060 Ventus 2X Black OC 8GB
Storage:
    476GB ADATA SU650 (SATA (SSD))
    931GB KINGSTON SNV2S1000G (SATA-2 (SSD))