-
Pre-selecting a range on the timeline
Posted by Max O’connor on March 7, 2016 at 4:09 pmIs there a way to set up a function (or is there an existing function) to make a cut or place a marker that then automatically pre-selects a chunk of the timeline say 15s before and after where the marker or cut is placed?
I’m trying to streamline a process of taking a large (usually ~15 min) clip and quickly selecting the chunks I need to render. I do these often enough that I feel like there should be a faster way to go about it. Any help is appreciated!
Cheers!
Max O’connor replied 10 years ago 5 Members · 9 Replies -
9 Replies
-
John Rofrano
March 8, 2016 at 3:27 amIt’s really easy to make an accurate loop selection. Just type the length in the loop selection box in the lower right corner:
So just position the timeline cursor wherever you want the loop and then type: 15.0 in that box and you’ll have a perfect 15 second loop. Most people don’t realize that you can enter values in the box. They think it’s for display only.
~jr
http://www.johnrofrano.com
http://www.vasstsoftware.com -
Paul Berk
March 8, 2016 at 4:17 amI don’t see an automatic way to enlarge a selection 15 seconds on each end. But it seems to me to easy enough (and quick) to drag the selection bar on each end to an approximate 15 seconds. If your purpose is to make sure you have a clean start and end to the clip, that should work.
-
Wayne Waag
March 8, 2016 at 4:07 pmYou can easily do this if you have Vegasaur, although it is a 2 step process. Step 1. On Create tab, Convert from Marker to Region with a length of 30 sec. Step 2. On the Tools tab, Tick Adjust Position, Move to Left, 15 sec. The result will be a region that begins 15 sec before and ends 15 sec after each Marker.
wwaag
-
Edward Troxel
March 12, 2016 at 5:11 pmWith the cursor in the “marker” position, all you need is the following:
myVegas.Transport.SelectionStart = myVegas.Transport.CursorPosition – new Timecode(“00:00:15:00”);
myVegas.Transport.SelectionLength = new Timecode(“00:00:30:00”);That start a selection area 15 seconds before the cursor and then create a selection area for a length of 30 seconds. Naturally, it will need to be wrapped in the code to make it a full script. Just copy the text below and save it in a file name “CreateSelectionArea.cs”
//
// Create Selection Area 30 seconds around cursor
//
// By Edward Troxel – March 12, 2016using System;
using System.IO;
using System.Text;
using Sony.Vegas;public class EntryPoint
{
Vegas myVegas;public void FromVegas(Vegas vegas)
{
myVegas = vegas;myVegas.Transport.SelectionStart = myVegas.Transport.CursorPosition – new Timecode(“00:00:15:00”);
myVegas.Transport.SelectionLength = new Timecode(“00:00:30:00”);}
}
-
Paul Berk
March 12, 2016 at 6:06 pmYour script works just fine Ed .. clever .. but not sure it’s useful. My impression was that the OP wanted to add 15 seconds to each end of a selection, not just 15 seconds on each side of the cursor position. The idea would be to extend the selection a bit on each side for purposes of rendering these selections as compilation clips. In other words, cherry picking longer events into highlights for future project media. What might work is to add something to the Batch Render script that would extend the region by X number of seconds on each side as you do the Batch Render.
-
Edward Troxel
March 15, 2016 at 5:07 pmLooks to me like it’s 15 sec before or after a marker or cut. Just put the cursor on the marker or cut and the script will work fine.
automatically pre-selects a chunk of the timeline say 15s before and after where the marker or cut is placed?
Expanding a selection area by 15 sec on each end would be very similar:
myVegas.Transport.SelectionLength = myVegas.Transport.SelectionLength + new Timecode(“00:00:30:00”);
myVegas.Transport.SelectionStart = myVegas.Transport.SelectionStart – new Timecode(“00:00:15:00”); -
Paul Berk
March 16, 2016 at 4:30 amThanks Ed. I know little about scripting for Vegas so your example was educational .. The last script you posted seems to work fine if the cursor position is set at the beginning of the selection, but does not work when the cursor is at the end of the selection.
At least for me, (maybe I’m doing something wrong) if the cursor position is at the end of the selection, then instead of a larger selection ( 15 seconds longer on each side) you get a smaller selection, 15 seconds less on each side.
Is there a way, I wonder, to force the cursor position to the beginning of the selection in the script? Just wondering, I have no burning need for this script.
-
Edward Troxel
April 16, 2016 at 4:16 pmThe cursor position should have no bearing on these two lines:
myVegas.Transport.SelectionStart = myVegas.Transport.SelectionStart – new Timecode(“00:00:15:00”);
myVegas.Transport.SelectionLength = myVegas.Transport.SelectionLength + new Timecode(“00:00:30:00”);They do not reference the cursor position at all. They only look at the current selection area and adjust it to start 15 seconds earlier and be 30 seconds in length.
These two lines do reference the cursor position:
myVegas.Transport.SelectionStart = myVegas.Transport.CursorPosition – new Timecode(“00:00:15:00”);
myVegas.Transport.SelectionLength = new Timecode(“00:00:30:00”); -
Max O’connor
April 22, 2016 at 5:36 pmSorry for the late response but thanks so much for responding! This helped me out a lot.
Reply to this Discussion! Login or Sign Up

