Page 1 of 1

Dynamic import and export paths, possible?

PostPosted: Mon Jan 29, 2018 3:22 pm
by ThomasManz
I have a script where I load a couple of images in (img1In, img2In, img3In), process them and then output them (img1Out, img2Out, img3Out). For these 6 nodes (3 Loader and 3 Saver) I would like the Filename path to be somewhat dynamic, like "myFolder/subfolder/<clientname>/img01In.jpg", "myFolder/subfolder/<clientname>/img02In.jpg". So that I have one custom tool where I insert the string of the client and it's then evaluated in all the Loaders and Savers.

Is that possible in the prior mentioned or any other approach?

Thanks in advance.

Re: Dynamic import and export paths, possible?

PostPosted: Mon Jan 29, 2018 6:37 pm
by alan bovine
You can't have dynamc expressions on the file path knob like you can in Nuke, BUT you can write a tiny python or Lua script that will add whatever you want to the file paths. In many ways; either as a script you run for the comp, or on each Saver node itself etc.

If you're looking for more hardcore / pipeline related fusion stuff the forum WeSuckLess is a better place to be around https://www.steakunderwater.com/wesuckless/

But here's is how you create a Saver node and set some values (like custom file paths) to get you started.

Code: Select all
 
comp.Lock()       
writeNode = comp.Saver
writeNode.Clip = fileName
writeNode.CreateDir = 1
comp.Unlock()