Page 1 of 1

Name Tokens for saver nodes

PostPosted: Fri May 11, 2018 9:34 pm
by Rich Nosworthy
Hi again,

just following on from my question about padding filenames in saver nodes. Does fusion have any special keywords or tokens that let you access things like the project file name?

For example after effects has something like [compname] which you can put in the output module to specify what the comp is called.

Just looking for a way that i can output my file based on the naming of the fusion comp.

Thankyou

Re: Name Tokens for saver nodes

PostPosted: Fri May 11, 2018 10:24 pm
by michael vorberg
Right now the loader /saver filenames aren't scriptable

You can use some variables from the path map in settings, but that's all

Re: Name Tokens for saver nodes

PostPosted: Fri May 11, 2018 10:58 pm
by Bryan Ray
They're scriptable; they just can't take expressions.

We set most Saver clips by script upon creating the comp from our project management software. I also have a comp script that creates Savers for a particular template. Here are a few relevant lines from that script:

Code: Select all
   x,y = c.CurrentFrame.FlowView:GetPos(c.nullorig)
   origsv = comp:AddTool("Saver", x+2, y+1)
   origsv.Clip = origpath
   origsv.CreateDir = 1
   origsv.OpenEXRFormat.Depth = 1
   origsv.Input = c.nullorig.Output
   origsv:SetAttrs({TOOLS_Name = "origsaver"})


Line 3 sets the file name, and origpath (orig being short for 'original resolution') is created elsewhere in the script. You can get the composition's filename by querying its attributes:

Code: Select all
dump(composition:GetAttrs())


That will display all of the comp's attributes. They're a sub-table under that method, so you can access the comp's name with
composition:GetAttrs().COMPS_Name

You'll probably want to do a little work to strip off the file extension.

Re: Name Tokens for saver nodes

PostPosted: Fri May 11, 2018 11:05 pm
by Rich Nosworthy
interesting, thanks for the info guys, will take a look into this!