Previous Thread  Next Thread

chat icon Changing render output name in File Output Nodes ???

_patrice_

Posted: Sun Jul 29, 2012 2:21 pm
Joined: 28 Feb 2012
Posts: 5
Hi,

I wrote a plugin for blender 2.57 and try now to fix the problems I have when running the plugin in blender 2.63.

In my old script I create some different file output nodes (image,depth,...) and render multiple views of a scene in a loop (not using the timeline) storing the different outputs with a increasing filename counter:

in 2.57 this works:
Code:
 
nodes = bpy.data.scenes[0].node_tree.nodes
imgOutNode = nodes["File Output"]
depthOutNode = nodes["Depth_File_Output"]

for n in range(something):
fileindex = "%3.3i_" % (n)
imgOutNode.filepath = path.join(filepath,'images/',fileindex)
depthOutNode.filepath = path.join(filepath,'depth/',fileindex)


(This has rendered sequences: 000_Image0001.png, 001_Image0001.png,...)


But the .filepath property doesn't exist anymore in the node objects.

I found out that they now have the base_path proberty:

Code:

fileindex = "%5.5i_" % (n)
imgOutNode.base_path = path.join(filepath,'images/')
depthOutNode.base_path = path.join(filepath,'depth/')



But I have no idea how to access now the output filename. How can I change for each output node the name similar to this:

Code:

imgOutNode.secretFileName = fileindex
depthOutNode.secretFileName = fileindex


Hope my description is not that confusing and anyone can help me with this...!? Rolling Eyes
Reply with quote


floww

Posted: Fri Oct 12, 2012 10:42 am
Joined: 12 Oct 2012
Posts: 1
Hi,

you can set the name of the image via

[code]
imgOutNode.file_slots[0].path = "name_of_output_img"
[/code]

Hope that helps.

Regards, Flo
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group