-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDisableResample.cs
49 lines (45 loc) · 1.43 KB
/
DisableResample.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.IO;
using System.Text;
using System.Drawing;
using System.Reflection;
using System.Diagnostics;
using System.Collections;
using System.Windows.Forms;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Microsoft.Win32;
using ScriptPortal.Vegas;
public class EntryPoint
{
Vegas myVegas;
public void FromVegas(Vegas vegas)
{
myVegas = vegas;
bool resampleDisabled = false;
foreach (Track track in myVegas.Project.Tracks)
{
if (track.MediaType == MediaType.Video)
{
foreach (TrackEvent evnt in track.Events)
{
VideoEvent videoEvent = evnt as VideoEvent;
if (videoEvent != null && videoEvent.ResampleMode != VideoResampleMode.Disable)
{
videoEvent.ResampleMode = VideoResampleMode.Disable;
resampleDisabled = true;
}
}
}
}
if (resampleDisabled)
{
MessageBox.Show("Disabled resample for all vids on the timeline", "Resample Disabled", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("None were disabled", "Resample Disabled", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
//By Vramuser