Mercurial > vegas-scripts
view Flip Events (Quad).cs @ 5:6dcd5eef9c97
Update Add Dynamics.cs
committer: GitHub <noreply@github.com>
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Sat, 11 Feb 2023 11:20:28 -0500 |
parents | d32ae6be32a4 |
children |
line wrap: on
line source
#define VER_GEQ_14 // remove this for vegas 13 #if VER_GEQ_14 using ScriptPortal.Vegas; #else using Sony.Vegas; #endif using System.Windows.Forms; public class EntryPoint { public void FromVegas(Vegas vegas) { foreach (Track track in vegas.Project.Tracks) { int count = 1; foreach (TrackEvent trackEvent in track.Events) { if (trackEvent.Selected && trackEvent.IsVideo()) { VideoEvent video = trackEvent as VideoEvent; foreach (VideoMotionKeyframe keyframe in video.VideoMotion.Keyframes) { VideoMotionVertex tl = keyframe.TopLeft, tr = keyframe.TopRight, bl = keyframe.BottomLeft, br = keyframe.BottomRight; VideoMotionBounds bh = new VideoMotionBounds(tl, tr, br, bl); switch (count) { case 2: keyframe.Bounds = new VideoMotionBounds(tr, tl, bl, br); break; case 3: keyframe.Bounds = new VideoMotionBounds(br, bl, tl, tr); break; case 4: keyframe.Bounds = new VideoMotionBounds(bl, br, tr, tl); break; } if (count == 4) count = 0; count += 1; } } } } } }