Mercurial > vegas-scripts
comparison screenflip_vert.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 switch (count) { | |
23 case 2: | |
24 keyframe.Bounds = new VideoMotionBounds(tr, tl, bl, br); | |
25 break; | |
26 case 3: | |
27 keyframe.Bounds = new VideoMotionBounds(br, bl, tl, tr); | |
28 break; | |
29 case 4: | |
30 keyframe.Bounds = new VideoMotionBounds(bl, br, tr, tl); | |
31 break; | |
32 } | |
33 if (count == 4) | |
34 count = 0; | |
35 count += 1; | |
36 } | |
37 } | |
38 } | |
39 } | |
40 } | |
41 } |