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

Re: Pan/Crop Script for Custom Presets?

COW Forums : VEGAS Pro

VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


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.



Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]