Comments

ChrisDolan (SCS) wrote on 5/23/2014, 9:42 AM
This question would fit better in the Scripting forum. The solution will likely involve changing the loop region via modifying the Vegas.SelectionStart and Vegas.SelectionLength properties in a for-loop and then invoking a render with a generated filename.

Something roughly like this, if I've understood your goal correctly:

RenderArgs renderArgs = new RenderArgs();
renderArgs.UseSelection = true;
// TODO: configure the render with the right template
long totalFrames = vegas.Project.Length.FrameCount;
long stepFrames = ProjectTimecode.FromSeconds(vegas.Project, 300).FrameCount; // five minutes per render
for (int i = 0; i * stepFrames < totalFrames; ++i)
{
long startFrame = i * stepFrames;
long renderLength = Math.Min(stepFrames, totalFrames - startFrame);
vegas.SelectionStart = ProjectTimecode.FromFrames(vegas.Project, startFrame);
vegas.SelectionLength = ProjectTimecode.FromFrames(vegas.Project, renderLength);
renderArgs.OutputFile = "C:\\Render\\R" + i + ".mp4";
vegas.Render(renderArgs);
}

GOCYCLE wrote on 5/24/2014, 6:53 AM
Correct.....scripting issue Thanks
OldSmoke wrote on 5/24/2014, 9:47 AM
vegasaur has an option to render regions

Proud owner of Sony Vegas Pro 7, 8, 9, 10, 11, 12 & 13 and now Magix VP15&16.

System Spec.:
Motherboard: ASUS X299 Prime-A

Ram: G.Skill 4x8GB DDR4 2666 XMP

CPU: i7-9800x @ 4.6GHz (custom water cooling system)
GPU: 1x AMD Vega Pro Frontier Edition (water cooled)
Hard drives: System Samsung 970Pro NVME, AV-Projects 1TB (4x Intel P7600 512GB VROC), 4x 2.5" Hotswap bays, 1x 3.5" Hotswap Bay, 1x LG BluRay Burner

PSU: Corsair 1200W
Monitor: 2x Dell Ultrasharp U2713HM (2560x1440)

rs170a wrote on 5/24/2014, 10:07 AM
I found this script by John Rofrano. I know it works on Pro 10 32 bit. Hope it helps.

Mike




/**
* Program: RegionsAtEvents.cs
* Author: John Rofrano
* Purpose: This script will place a region at each event on the selected track(s)
* Copyright: (c) 2010, Sundance Media Group / VASST
* Updated: February 27, 2010
**/
using System;
using System.Windows.Forms;
using Sony.Vegas;

class EntryPoint
{
public void FromVegas(Vegas vegas)
{
foreach (Track track in vegas.Project.Tracks)
{
// only process selected tracks
if (!track.Selected) continue;

foreach (TrackEvent trackEvent in track.Events)
{
Region region = new Region(trackEvent.Start, trackEvent.Length, trackEvent.ActiveTake.Name);
try
{
vegas.Project.Regions.Add(region);
}
catch (Exception e)
{
MessageBox.Show(String.Format("Could not place a region at {0}\nError message is: {1}", trackEvent.Start.ToString(), e.Message), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
}
}