accessing Render Output TO: [Template] with Javascript

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
johnnygjunior
Posts: 3
Joined: June 29th, 2017, 8:55 am

Hi,
   I was wondering if there is a way to set the "Output To:"  a template like  [COMP].[ext] through Ext Javascript.
I've been looking all over and can only find how to set a template for an output module, but I can't find how to access the Output To Templates.

I am looking to set the filename to [projectName].[ext]

when i save [projectName].[ext] as "Project Name" - i've tried to access it using  

Code: Select all

theRender.outputModules[1].applyTemplate("Project Name");
but i get an error that it does not exist.

thank you in advance.
Johnny G.

Johnny G.
johnnygjunior
Posts: 3
Joined: June 29th, 2017, 8:55 am

I seem to have figured it out.   I think.

Code: Select all

/// windows os 
var dir = "/c/folderName/foldername/";
var myFile = new File(dir + "[projectName]_[####].[ext]");
I hope that helps someone.   projectName is not using the saved template i created... rather its using the fields already created in afterfx
pjotr
Posts: 2
Joined: July 12th, 2019, 4:45 am

applyTemplate() is to determine the output template (file format and settings), not the file name.

However, I am writing here because I have ran into problems with this function. I created a template called "PNG" and call applyTemplate("PNG"), but complier sais there is no such template. Weird. Runs on another computer with the same template. Any ideas?
Post Reply