Turn off Loop region?

Post » Wed Jun 09, 2010 3:10 am

Carried over from THIS in Vegas Forum . .

I can't make JM's script function. I Copied and pasted into Notepad and saved as KillRegion.js - yes? Is that correct?

Grazie
User avatar
saharen beauty
 
Posts: 490
Joined: Tue Nov 21, 2006 6:54 pm

Post » Wed Jun 09, 2010 8:56 am

I'm not sure what John's script is trying to do but this will collapse the loop region thus turning it off in Vegas Pro 8.0 (which I know you are using). This will not work in Vegas 7 and below because it uses the new Vegas Pro 8.0 Transport class.

Here is the code:

Code Block:
/** * Program: ZeroLoopRegion.cs * Description: This script will remove the loop region and selection in Vegas Pro 8.0 * Author: John Rofrano * * Revision Date: May. 19, 2008 **/using System;using Sony.Vegas;class EntryPoint{ public void FromVegas(Vegas vegas) { vegas.Transport.LoopRegionLength = Timecode.FromNanos(0); vegas.Transport.SelectionLength = Timecode.FromNanos(0); }}

Just cut and paste it into ZeroLoopRegion.cs (not .js !) This would be great to place as an icon on the toolbar. I know I would use it a lot and I'm not sure why I didn't think of it a lot sooner. The loop region drives me nuts too when I don't need it.

~jr
User avatar
Jennifer Munroe
 
Posts: 515
Joined: Sat Aug 25, 2007 6:57 pm

Post » Wed Jun 09, 2010 1:02 am

Nifty.
User avatar
Arrogant SId
 
Posts: 485
Joined: Sat May 19, 2007 5:39 am

Post » Wed Jun 09, 2010 2:49 pm

I tried the code block in v8, did't work.

I get error occurred during execution of the script ...... zeroloopregion.cs
error 0x8000020(message missing)

I copy the code into a file and saved it has a text file ZeroLoopRegion.cs

It shows up as a cs file type in my script folder under v8.

Did I do this wrong or am I missing something in regards to adding this to some other file.

Also, is there a way to make a keyboard short cut to run either the script menu or a specific script?

Thanks in advance.....
User avatar
brandon frier
 
Posts: 522
Joined: Wed Oct 17, 2007 2:47 pm

Post » Wed Jun 09, 2010 9:38 am

Just went and read the link listed in first post.

I found what I needed in turning off the loop for playing by toggling it on and off using the Q key.

That works for what I want as many times I create a loop region inadvertently. I don't care if it's there, I just want to be able to play through it many time.

What is the intent of the zeroloopregion.cs.?

Disable loop region or erase current loop region?

User avatar
KiiSsez jdgaf Benzler
 
Posts: 543
Joined: Fri Mar 16, 2007 1:10 am

Post » Wed Jun 09, 2010 9:07 pm

It erases the current loop region.
User avatar
Farrah Lee
 
Posts: 457
Joined: Fri Aug 17, 2007 4:32 pm

Post » Wed Jun 09, 2010 9:08 am

Works perfectly for me. I added code to move it to the start of the timeline. I'm a beginner in all of this...
Code Block:
/** * Program: ZeroLoopRegion.cs * Description: This script will remove the loop region and selection in Vegas Pro 8.0 * Author: John Rofrano * * Revision Date: May. 19, 2008 * Bob Denny 31-Jul-2008 Move it to the start of the timeline too. **/using System;using Sony.Vegas;class EntryPoint{ public void FromVegas(Vegas vegas) { vegas.Transport.LoopRegionStart = Timecode.FromNanos(0); vegas.Transport.LoopRegionLength = Timecode.FromNanos(0); vegas.Transport.SelectionLength = Timecode.FromNanos(0); vegas.Transport.SelectionLength = Timecode.FromNanos(0); }}

User avatar
Sammygirl
 
Posts: 507
Joined: Fri Jun 16, 2006 12:15 pm


Return to Vegas Pro Forum