The forum is active for archival purposes only.

Join our discord community for new topics.

论坛导航
您需要登录才能建立帖子与主题。

Nuke write node - File path

Hello

How easy would it be to make a custom edit to this part of the file path in the prismWrite node? (see attached)

I tried converting the gizmo to a group and did some poor attempts of editing the code, but no luck so far 🙁
Can someone point me in the right direction?

Thanks!
Olle

已上传的文件:
  • 您必须登录才有权限上传。

You could modify the path in the Nuke node, which was generated by Prism or you could go into the Prism script and change the code directly, which generates the path.

For smaller changes it's probably easier to do it just in the Nuke node. For that you have to convert the gizmo to a group and dive into it. The "WritePrismBase" node is a usual write node with a python expression in the file parameter. Since it's a multiline expression it's easier to copy the expression to an external text editor, edit it there and than copy it back to the write node.

The default expression is:

[python -exec {
opath = ""
try:
    opath = pcore.appPlugin.getOutputPath(nuke.thisNode(), nuke.thisGroup())
except:
    opath = nuke.thisGroup().knob("fileName").toScript()

}][python opath]

You could modify it to something like this:

[python -exec {
opath = ""
try:
    opath = pcore.appPlugin.getOutputPath(nuke.thisNode(), nuke.thisGroup())
except:
    opath = nuke.thisGroup().knob("fileName").toScript()

import os
opath = os.path.dirname(opath) + "/myfilename.####.exr"
nuke.thisGroup().knob("fileName").setValue(opath)

}][python opath]

Super helpful. Thank you!