FORUMS: list search recent posts

FourPoints Script not working for Vegas 13

COW Forums : VEGAS Pro

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Cody Davis
FourPoints Script not working for Vegas 13
on Sep 24, 2018 at 12:07:32 pm

FourPoints Script not working for Vegas 13. My version of Pluraleyes does not work in ver 14 or 15. Is there a script available that will work.


Return to posts index

Edward Troxel
Re: FourPoints Script not working for Vegas 13
on Sep 24, 2018 at 5:28:30 pm

Vegas Pro 13 uses: using Sony.Vegas;

Vegas Pro 14+ uses: using ScriptPortal.Vegas;

Make sure your four points script is using the correct "using" line at the top of the script.

Edward Troxel


Return to posts index

Cody Davis
Re: FourPoints Script not working for Vegas 13
on Sep 24, 2018 at 10:01:40 pm

It was giving an error with details:C:\Users\owner\Documents\Vegas scripts\vegas 4 point selection script.cs(3) : The type or namespace name 'Vegas' could not be found (are you missing a using directive or an assembly reference?)

I don't understand: the Vegas Pro 13 uses: using Sony.Vegas;

Vegas Pro 14+ uses: using ScriptPortal.Vegas;
____
This is the script I was using:

public class EntryPoint
{
Vegas myVegas;

public void FromVegas(Vegas vegas)
{
myVegas = vegas;

//Change this line to change the distance between the points
Timecode FPDist = new Timecode("00:00:01:00");

foreach(Track track in myVegas.Project.Tracks)
{
//Now check for Volume Envelope
if (track.IsAudio() && track.Selected)
{
// Find the volume envelope on this track - add if needed
Envelope VolEnv = FindEnvelope(track, EnvelopeType.Volume);
if (null == VolEnv)
{
VolEnv = new Envelope(EnvelopeType.Volume);
track.Envelopes.Add(VolEnv);
}

double ClipVol = VolEnv.ValueAt(myVegas.SelectionStart);
//Now set the points
SetPoint(VolEnv, myVegas.Transport.LoopRegionStart, ClipVol);
SetPoint(VolEnv, myVegas.Transport.LoopRegionStart - FPDist, ClipVol);
SetPoint(VolEnv, myVegas.Transport.LoopRegionStart + myVegas.Transport.LoopRegionLength + FPDist, ClipVol);
SetPoint(VolEnv, myVegas.Transport.LoopRegionStart + myVegas.Transport.LoopRegionLength, ClipVol);
}
}
}

private Envelope FindEnvelope(Track track, EnvelopeType etype)
{
foreach(Envelope env in track.Envelopes)
{
if (env.Type == etype)
{
return env;
}
}
return null;
}

private void SetPoint(Envelope menv, Timecode PLoc, double PVal)
{
EnvelopePoint a = menv.Points.GetPointAtX(PLoc);

if (a == null)
{
a = new EnvelopePoint(PLoc, PVal);
menv.Points.Add(a);
}
else
{
a.Y = PVal;
}
}

}


Return to posts index


George Dean
Re: FourPoints Script not working for Vegas 13
on Sep 24, 2018 at 11:21:27 pm

Hi Cody,

I'm not a script writer, so this may not be anywhere close, but if it were me I would try........

Add this without the quotes "using ScriptPortal.Vegas;" before the line in your script "public class EntryPoint"

You may also need to replace "Vegas myVegas;" to "ScriptPortal.Vegas.Vegas meVegas;", again without quotes. Hopefully Edward will reply back with the correct stuff!


Best Regards......George


Return to posts index

Edward Troxel
Re: FourPoints Script not working for Vegas 13
on Sep 25, 2018 at 3:39:16 pm

At the top of the script above the lines you posted will be several "Using" lines. One of them will point to Vegas. You need to use the correct one based on my first post. Your error message indicates the wrong one is being used.

Edward Troxel


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
podcasts
© 2019 CreativeCOW.net All Rights Reserved
[TOP]