MAGIX VEGAS: MAGIX Vegas Tutorials MAGIX Vegas Forum Articles Black Magic Design Forum AJA Xena Forum

Pan/Crop Script for Custom Presets?

COW Forums : VEGAS Pro

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris Waycaster
Pan/Crop Script for Custom Presets?
on Mar 5, 2020 at 4:25:49 pm

The specs:
I have already purchased Vegasuar 3.9.4 (newest version) as well as done free trials of various other Vegas extension, and have accumulated and modified all of the free scripts I could possibly find online, none of them have provided the solution. I am running Vegas Pro 14 on Windows 10 (I have also modified older scripts to work with vegas 14 so older script suggestions are welcome)

The situation:
I use the Pan/Crop tool a lot...easily over 200 times per workday. Many of the cuts are simple pan/crop presets I have saved such as "Center" "Right" "Left", very basic jumpcut stuff for YouTube editing.

I'd like to have an easier way to access the Pan/Crop presets. The easiest way I can think of is to have a script where it just jumps to the preset (I use these for basic color correcting functions and it saves me SO much time)

I've read people claiming it's impossible to modify the pan/crop via script since it's different than an effect, but I know this isn't true because Vegasaur has a 1-Click Command (script) for resetting the pan/crop to default that I use often.

If I could modify or even view the source of the Vegasaur 1-Click Command (scrip) I could probably figure something out. OR if anyone can recommend a working pan/crop script that I could tinker around with that would be amazing!

Of course any off the wall ideas are welcome here too - I only care about workflow and results :)


Return to posts index

Tyson Onaga
Re: Pan/Crop Script for Custom Presets?
on Mar 11, 2020 at 10:08:01 pm

If you are trying to modify Pan/Crop keyframes (KFs) for a selected Event, you need to find the Event in the script. Something like:

foreach ( Track track in vegasApp.Project.Tracks )
{
if ( ( !track.IsVideo() ) || ( !track.Selected ) )
continue;

foreach ( VideoEvent videoEvent in track.Events )
{
if ( !videoEvent.Selected )
continue;

// Now you have a selected Event ...
}
}


KFs are stored in the VideoMotionKeyframe class, each one is stored in a List:
class VideoMotionKeyframes : BaseList(VideoMotionKeyframe)

You can iterate/modify the List from the videoEvent, eg:

foreach ( VideoMotionKeyframe vmkf in
videoEvent.VideoMotion.Keyframes )


Each vmkf object has various properties:
Timecode Position
Single Smoothness
VideoMotionVertex TopLeft
VideoMotionVertex TopRight
VideoMotionVertex BottomRight
VideoMotionVertex BottomLeft
VideoMotionVertex Center
VideoMotionBounds Bounds
Double Rotation
VideoKeyframeType Type


which can be easily modified, eg:
vmkf.TopLeft =
vmkf.TopRight =
vmkf.BottomRight =
vmkf.BottomLeft =

You can modify entry(s) in the List of Keyframes, erase the List, add to the List by using standard List methods.



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]