def autoWrite():
path = "[python {'/'.join(nuke.root()['name'].value().split('/')[0:-3])}]/renders/nuke/[string trim [file tail [value root.name]] .nk]/[string trim [file tail [value root.name]] .nk]_####.exr"
nuke.createNode("Write").knob('file').setValue(path)
If I run this code I get an error saying "IndentationError: expected an indented block". Although, if I remove the "def autoWrite" in the beginning the code works. Problem is that I need to def autoWrite for it to work with my menu.py file.
The path takes the current position of the nuke script and automatically creates render locations for the script.
Post a Comment