-
A request for a very simple vegas script
Posted by Dozzer Rokington on January 11, 2014 at 5:43 amHello creative peoples! I have a small dilemma. I would like to have a script that simply horizontal flips every other clip after the selected clip or just selects it. I know Vegasaur has this feature but I don’t see paying that insanely high price for one feature. Any help would be greatly appreciated.
Graham Bernard replied 12 years, 7 months ago 3 Members · 7 Replies -
7 Replies
-
Graham Bernard
January 11, 2014 at 8:17 amI use Paste Event Attribute to add Properties from one Event to another. This works with “Flip”. However, I don’t know of a Select “Every Other” script, but 7 and 9 on the Numerical KP allows me to Select the Previous/Next Event, then I can use Paste Event Attributes to apply the “Flip”.
Cheers
Grazie
Video Content Creator and Potter
PC 7 64-bit 16gb * Intel® Core™i7-2600k Quad Core 3.40GHz * 2GB NVIDIA GEFORCE GTX 560 Ti
Cameras: Canon XF300 + PowerShot SX50HS Bridge -
Matt Carlson
January 11, 2014 at 11:20 amHere you go.
using System;
using Sony.Vegas;class EntryPoint
{public void FromVegas(Vegas vegas)
{const int TrackNumber = 1; // Choose Your Track Number Here
const int Interval = 2; // Choose Your Interval HereTrack t = vegas.Project.Tracks[TrackNumber - 1];
bool go = false;
int counter = Interval - 1;
foreach(TrackEvent ev in t.Events)
{
if (ev.Selected)
go = true;if (!go) continue;
counter++;
if (counter == Interval)
{
VideoEvent ve = (VideoEvent)ev;
VideoMotionKeyframe kf = ve.VideoMotion.Keyframes[0];
VideoMotionVertex tl = kf.TopLeft;
VideoMotionVertex tr = kf.TopRight;
VideoMotionVertex bl = kf.BottomLeft;
VideoMotionVertex br = kf.BottomRight;
VideoMotionBounds bound = new VideoMotionBounds(tr, tl, bl, br);
ve.VideoMotion.Keyframes[0].Bounds = bound;ve.Selected = true; // Not necessary but is a visual representation of the affected events
counter = 0;
}
}}
}
-
Graham Bernard
January 11, 2014 at 11:27 amMatt? How do I get that into the correct SCRIPT format? Presently when I COPY and PASTE into Notepad there are no carriage returns?
Cheers
Grazie
Video Content Creator and Potter
PC 7 64-bit 16gb * Intel® Core™i7-2600k Quad Core 3.40GHz * 2GB NVIDIA GEFORCE GTX 560 Ti
Cameras: Canon XF300 + PowerShot SX50HS Bridge -
Graham Bernard
January 11, 2014 at 11:29 amAh! I wrongly copied directly from HERE the COW site.
Now, save as a .js or .cs?
Cheers
Grazie
Video Content Creator and Potter
PC 7 64-bit 16gb * Intel® Core™i7-2600k Quad Core 3.40GHz * 2GB NVIDIA GEFORCE GTX 560 Ti
Cameras: Canon XF300 + PowerShot SX50HS Bridge -
Graham Bernard
January 11, 2014 at 11:33 amMATT!! Excellent! – Is/can there be ANY USER control over this?
Grazie
Video Content Creator and Potter
PC 7 64-bit 16gb * Intel® Core™i7-2600k Quad Core 3.40GHz * 2GB NVIDIA GEFORCE GTX 560 Ti
Cameras: Canon XF300 + PowerShot SX50HS Bridge -
Matt Carlson
January 11, 2014 at 8:41 pmIt is a .cs script… but it looks like you figured it out already.
I could put user control in the script but I have already written a selection tool that does intervals and so much more as part of an extension. I was thinking of just putting the selection tool as it’s own stand alone extension and now seems like a good time to work on it. I will post it in a day or two.
-
Graham Bernard
January 11, 2014 at 8:51 pmHeavenly! I’ll look forward to it. Thanks for your work Matt.
G
Video Content Creator and Potter
PC 7 64-bit 16gb * Intel® Core™i7-2600k Quad Core 3.40GHz * 2GB NVIDIA GEFORCE GTX 560 Ti
Cameras: Canon XF300 + PowerShot SX50HS Bridge
Reply to this Discussion! Login or Sign Up