import nuke
def deadlineWrite():
#declare nodes
s = nuke.nodes.mkslate()
p = nuke.nodes.pan2lin()
w = nuke.nodes.Write()
#set connections
w.setInput(0,p)
p.setInput(0,s)
#disable pan2lin gizmo by default
p.knob( 'disable' ).setValue(1)
#Render Settings
target = '/Volumes/mkkr/PROJECTS/[string range [knob mkSlate.shot] 0 2]/[string range [knob mkSlate.shot] 4 6]/[knob mkSlate.shot]/outbox/[knob mkSlate.shot]_[knob mkSlate.ver]/[knob mkSlate.shot]_[knob mkSlate.ver].####.dpx'
w.knob( 'colorspace' ).setValue( 'Panalog')
w.knob( 'file' ).setValue( target )
w.knob( 'file_type' ).setValue('dpx')
Which works just fine for me.
If you notice, the variable target is a long string of text and TCL that is put in the file knob of the generated write node.
If my artists hit Render locally, things work great. However, if they send to our farm (we’re using deadline) a "\" puts itself in front of every "[" in the tcl code. I don’t know TCL very well, I tried a bunch of TCL syntax things but nothing seems to be working.
Right now, my solution is to have my artists hit the folder icon and hard code the filepath. I would like to avoid this however, and simply find the correct syntax for sending this TCL to my windows XP farm.
NOTE: Deadline already fixes the file pathing issue between mac and pc. That is not a problem.
Any help is VERY MUCH appreciated!
Post a Comment