Disable Resample Script

Jep wrote on 4/18/2018, 9:28 PM

I used to use the following script in Vegas Pro13 64bit and it was great. I've moved up to a new system with Vegas Pro 15 64bit and the script won't work anymore

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 Sony.Vegas;
public class EntryPoint
{
Vegas myVegas;
public void FromVegas(Vegas vegas)
{
myVegas = vegas;
foreach (Track track in myVegas.Project.Tracks)
{
if (track.IsVideo())
{
foreach (TrackEvent evnt in track.Events)
{
VideoEvent videoEvent = (VideoEvent)evnt;
VideoResampleMode VRMode = VideoResampleMode.Disable;
// VideoResampleMode.Force;
// VideoResampleMode.Disable;
videoEvent.ResampleMode = VRMode;
}
}
}
}
}

I get the following error message in Vegas when I run it

C:\Program Files\VEGAS\VEGAS Pro 15.0\Script Menu\Disable Resample.cs(12) : The type or namespace name 'Sony' could not be found (are you missing a using directive or an assembly reference?)
C:\Program Files\VEGAS\VEGAS Pro 15.0\Script Menu\Disable Resample.cs(15) : The type or namespace name 'Vegas' could not be found (are you missing a using directive or an assembly reference?)
C:\Program Files\VEGAS\VEGAS Pro 15.0\Script Menu\Disable Resample.cs(16) : The type or namespace name 'Vegas' could not be found (are you missing a using directive or an assembly reference?)

I tried editing the Using Sony.Vegas; line about half way down to Using Vegas.Vegas; but that didn't work. I'm not really script savvy, so I'd be grateful if anyone can tell me how to get this script to work.

TIA ;)

Comments

wwaag wrote on 4/18/2018, 10:31 PM

You're on the right track. Should be ScriptPortal.Vegas.

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

Jep wrote on 4/19/2018, 12:03 AM

Beautiful!!! Thank you so much.