how to set render mode in script?

Pete Siamidis wrote on 5/14/2011, 9:15 PM
I just made this post in the other forum, but realized this is probably the right place to ask this. I'm trying to automate some of my Vegas processes, and one of them requires setting the render mode right in script but I can't seem to find how to do that. For example, when running the included "Batch Render" script it puts a list of supported codecs and settings, but what I want is to not have that at all and instead always default to "MainConcept AVC/AAC" with my customized template which is based off the "Apple iPod 640x480 Video" template. Is there any way to do that in script?

Comments

LoTN wrote on 5/14/2011, 11:09 PM
Hello,

If the code borrowed from batch render script is almost intact:

You have to use the FindByName method of Renderer object class in order to get the wanted template data, then set the renderItem object values before the call to DoRender(). You can also remove the loop, the templates tree build and associated callbacks if not needed.

Hope this helps.
Pete Siamidis wrote on 5/15/2011, 10:01 PM
Awesome thanks, I ended up going a slightly different route than you suggested but you pushed me in the right direction. I basically tweaked the FillTemplateTree() call, and used the renderer object to only add the templates I want to support into the tree (just one right now), and I default them to being checked. That way I can see what templates are being rendered, and add more in the future if need be. Thanks for the help!