Mercurial > vegas-scripts
comparison screenflip.cs @ 1:32af787f8cb8
Migrate files from gist
committer: GitHub <noreply@github.com>
| author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
|---|---|
| date | Mon, 23 Jan 2023 23:25:44 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:08b074facb6b | 1:32af787f8cb8 |
|---|---|
| 1 #define VER_GEQ_14 // remove this for vegas 13 | |
| 2 #if VER_GEQ_14 | |
| 3 using ScriptPortal.Vegas; | |
| 4 #else | |
| 5 using Sony.Vegas; | |
| 6 #endif | |
| 7 using System.Windows.Forms; | |
| 8 | |
| 9 public class EntryPoint { | |
| 10 public void FromVegas(Vegas vegas) { | |
| 11 foreach (Track track in vegas.Project.Tracks) { | |
| 12 int count = 1; | |
| 13 foreach (TrackEvent trackEvent in track.Events) { | |
| 14 if (trackEvent.Selected && trackEvent.IsVideo()) { | |
| 15 VideoEvent video = trackEvent as VideoEvent; | |
| 16 foreach (VideoMotionKeyframe keyframe in video.VideoMotion.Keyframes) { | |
| 17 VideoMotionVertex tl = keyframe.TopLeft, | |
| 18 tr = keyframe.TopRight, | |
| 19 bl = keyframe.BottomLeft, | |
| 20 br = keyframe.BottomRight; | |
| 21 VideoMotionBounds bh = new VideoMotionBounds(tl, tr, br, bl); | |
| 22 if (count == 2) | |
| 23 bh = new VideoMotionBounds(tr, tl, bl, br); | |
| 24 keyframe.Bounds = bh; | |
| 25 } | |
| 26 if (count == 2) | |
| 27 count = 0; | |
| 28 count += 1; | |
| 29 } | |
| 30 } | |
| 31 } | |
| 32 } | |
| 33 } |
