Obviously there is a Insert empty event function from the insert menu.
But wondering if anyone here knows where i may still can find
an Insert Empty Event script?
Thanks.
Not sure why you want it but here: AddEmptyEvent.cs
//Script to add images in a directory to a new track
using System;
using System.Collections;
using System.IO;
using System.Text;
using System.Drawing;
using System.Reflection;
using System.Diagnostics;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Sony.Vegas;
public class EntryPoint
{
Vegas myVegas;
Track myTrack = null;
Timecode myTC = null;
Timecode myLen = null;
public void FromVegas(Vegas vegas)
{
myVegas = vegas;
myTC = myVegas.Transport.CursorPosition;
myLen = new Timecode("00:00:05:00");
//Find the first selected track
foreach (Track atrack in myVegas.Project.Tracks)
{
if (atrack.Selected)
{
myTrack = atrack;
break;
}
}
if (myTrack == null)
{
MessageBox.Show("No Track is selected. Please select a track and try again");
}
else
{
//Add an empty media
if (myTrack.IsVideo())
{
VideoEvent newEvent = new VideoEvent(myTC, myLen);
myTrack.Events.Add(newEvent);
}
else
{
AudioEvent newEvent = new AudioEvent(myTC, myLen);
myTrack.Events.Add(newEvent);
}
}
}
Thanks Edward, Works beautifully.
You see, as a Professional, there are certain different methods to
me and my team's everyday workflow on different systems that i follow. Hope that made sense, (smile)
Appreciate it.
I always see a sense in using a script if this means reducing the number of steps necessary to execute a function which I need very often. If it needs two steps to insert an empty event the normal way, but only one single step after I installed a script which gives me the chance to use a clickable icon or a keystroke command, than a script may have fullfilled the wish.
Maybe there are several functions which workflow could be simplified same way. And if there are seven functions like this I use hundred times a day, scripts like this would save 700 steps a day.
Though I need the empty event function once a week only, which don't make me a favorite client for this certain script, I see the value it may have for others.
Although, Steve says it's not about ease of use. So, i'm still curious as to why the script is better in his workflow. It might be nice to get some education. :)
> "You could also use the given keystroke assignment."
Yea, what's wrong with Alt+I E ?
I'm guessing that the time it takes Vegas to load a script and execute it will be longer than simply pressing Alt+I E. I too don't see the need for the script when it's already a default key sequence. I guess if you are inserting a lot of these in a row, pressing one key instead of two is 50% faster. ;-)
For all of you questioning the necessity of a script, Making ONE click on
a script icon in the toolbar, is Faster than right clicking, then scroll and
then left clicking again.
If someone prefers using a script icon over all other options,
What's the big deal?
What's the mystery in it to find out?
What curiosity can there be?
Scripts exit for ease of use, alternate option for a function, workflow preference
and faster edit route!
steve, i don't think anybody had any other thought behind their question other than, will it help ME out?
as it is i think moving from tl to toolbar to click an icon, rather than right click or keyboard shortcut is more time consuming and energy intensive...