Comments

jetdv wrote on 9/2/2006, 6:27 AM
You want to change this line:


String regionFilename = String.Format("{0}[{1}]{2}",
filename,
regionIndex.ToString(),
renderItem.Renderer.FileExtension.Substring(1));


For example, you could change filename to region.Label
R. Heffels wrote on 9/2/2006, 7:49 AM
aaah, thanks.
very nice..
dreamweaver seems to be able to color highlight this script file too.
will work !
thanks !
rcampbel wrote on 9/9/2006, 5:14 PM
I provide a third party tools for batch rendering called MultiRender. You can get more info and download the trial from:

http://www.peachrock.com/software/veggie-toolkit.html

Randall
vitalforce wrote on 9/22/2006, 9:45 PM
Multirender is first class, I vouch for it (in case you're still looking).
dslicht wrote on 10/10/2006, 6:58 AM
I must be missing something. I replaced "filename" with "region.Label" and I get an error message (System.ArgumentException: directory does not exist). I'm not very proficient with programming and a total novice to scripts. Additional advice would be appreciated - thanks!!!
jetdv wrote on 10/10/2006, 7:15 AM
When it opened the dialog box, did you point it to a valid folder under "Base file name"?
dslicht wrote on 10/16/2006, 3:55 PM
Yeah, that one caught me a few times, but I finally figured it out (i.e., point to a valid folder). After playing with it a bit more, I've isolated the problem somewhat. The script works fine in Vegas 6.0. But I've been playing with the 7.0 Demo and that's where it's not working. Why that's the case, I have no idea, but suffice it to say it works fine in 6.0d and does not work in 7.0a.
dslicht wrote on 10/16/2006, 3:57 PM
One other comment. In 7.0 it never even opens the dialog box. I get this error message:

C:\Program Files\Sony\Vegas 7.0\Script Menu\Batch Render Using Region Names.cs(175) : Warning as Error: 'System.IO.Path.InvalidPathChars' is obsolete: 'Please use GetInvalidPathChars or GetInvalidFileNameChars instead.'
C:\Program Files\Sony\Vegas 7.0\Script Menu\Batch Render Using Region Names.cs(194) : Warning as Error: 'System.IO.Path.InvalidPathChars' is obsolete: 'Please use GetInvalidPathChars or GetInvalidFileNameChars instead.'
jetdv wrote on 10/17/2006, 9:23 AM
That's because Vegas 7 uses .NET 2.0 and Vegas 6 uses .NET 1.1. Are you using the version that CAME with Vegas 7? Or trying to use the version you modified for Vegas 6? You might try opening the Vegas 7 version and adding your modifications there.
xberk wrote on 10/20/2006, 10:27 PM
Does anyone know how to modify the "batch render" script in Vegas 7 so that the region name can replace the "filename" variable ? I'm not too familiar with js, cs or vb coding and can't see how to fetch up the region label and stuff it into the "filename" variable. At least I know the "event" file names can be fetched as John Meyer has done that in his script that names the regions by the event filenames. What I want to do is output each of the events on the timeline as a .avi file preserving the original filename of that event. Why would I want to do that? File conversion of tricky MP4 files that just don't seem to want to work all the time in Vegas 7.


Paul B .. PCI Express Video Card: EVGA VCX 10G-P5-3885-KL GeForce RTX 3080 XC3 ULTRA ,,  Intel Core i9-11900K Desktop Processor ,,  MSI Z590-A PRO Desktop Motherboard LGA-1200 ,, 64GB (2X32GB) XPG GAMMIX D45 DDR4 3200MHz 288-Pin SDRAM PC4-25600 Memory .. Seasonic Power Supply SSR-1000FX Focus Plus 1000W ,, Arctic Liquid Freezer II – 360MM .. Fractal Design case ,, Samsung Solid State Drive MZ-V8P1T0B/AM 980 PRO 1TB PCI Express 4 NVMe M.2 ,, Wundiws 10 .. Vegas Pro 19 Edit

xberk wrote on 10/21/2006, 9:00 AM
Got it.
First I use John Meyer's script that creates regions from event file names
http://www.vasst.com/search.aspx?category=Regions
This amazing script works perfectly and does the work of getting
the fie names I wanted.
Then I made the following changes to Vegas 7's Batch Render.cs to actually
output the files.

String defaultBasePath = "Please browse for output path";
// this created an error and makes me browse for the output path
// but it does not append to any file name

String filename = Path.Combine(outputDirectory,
FixFileName("A") +
FixFileName("") +
"-" +
FixFileName(""));
// This changes the filename variable to "A-" for a prefix to my
// final name.

String regionFilename = String.Format("{0}{1}{2}",
filename,
region.Label,
//regionIndex.ToString(),
renderItem.Renderer.FileExtension.Substring(1));
// I deleted the brackets in the string formating as I didn't want them
// I left filename in as it is now filled with a prefix of "A-" which I wanted.
// I added the region.Label next to pickup the region labels
// that John Meyer's script created from the original event file names.
// and commented out the incrementing final digit as each
// name is now unique anyway

dlog.Text = "Batch Render2";
// this shows up in Vegas script tool window

Thanks to all who contribute to this forum. I have little knowledge of
cs or js coding or the Vegas API but all your posts and scripts helped
me get this done....And especially you John ! Your scripts are first rate !!

Any comments on this are welcome

Paul B .. PCI Express Video Card: EVGA VCX 10G-P5-3885-KL GeForce RTX 3080 XC3 ULTRA ,,  Intel Core i9-11900K Desktop Processor ,,  MSI Z590-A PRO Desktop Motherboard LGA-1200 ,, 64GB (2X32GB) XPG GAMMIX D45 DDR4 3200MHz 288-Pin SDRAM PC4-25600 Memory .. Seasonic Power Supply SSR-1000FX Focus Plus 1000W ,, Arctic Liquid Freezer II – 360MM .. Fractal Design case ,, Samsung Solid State Drive MZ-V8P1T0B/AM 980 PRO 1TB PCI Express 4 NVMe M.2 ,, Wundiws 10 .. Vegas Pro 19 Edit

michael_morlan wrote on 8/11/2007, 11:55 AM
I'm late to this thread but, some time ago, I modified John's excellent script to include rendering to files named after the region names.

http://michael-morlan.net/projects/vegas/BatchRenderGUI_NamedRegions.zip

I'll have to check whether the version I altered includes John's V7 updates.

Enjoy,

M
The157Gamer wrote on 7/4/2022, 12:45 PM

So i found a way to have it that it only saves it with your Regional Name and not what you rendered with or random name you put into Directory bar when running a script,

 

I replaced the following;

 

// construct the file name (most of it)
            String filename = Path.Combine(outputDirectory,
                                           FixFileName(baseFileName) +
                                           FixFileName(renderItem.Renderer.FileTypeName) +
                                           "_" +
                                           FixFileName(renderItem.Template.Name));

With This;

 // construct the file name (most of it)
            String filename = Path.Combine(outputDirectory,
                      " " );

 

The above made it that it still finds your location you want to save it but doesn't add the filename you put into the directory field but replaces it with a " "

 

You then need to change the following lines;

 

String regionFilename = String.Format("{0}[{1}]{2}",
                                                          filename,
                                                          regionIndex.ToString(),
                                                          renderItem.Extension);

To the following to have it render with only the region name ;

  String regionFilename = String.Format("{0}{1}{2}",
                                                          filename,
                                                          region.Label,
                                                          renderItem.Extension);

This ended up with the regional name being the only thing set as the file name if this is just what you want and not the extras that come along with batch renders,

Islander wrote on 9/26/2022, 10:39 PM

Hi The 157Gamer, this is soooo helpful. A real game changer for an efficient workflow! thanks a lot.