Zitat von olle am 9. Juli 2019, 17:36 UhrHello
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
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
Zitat von RichardF am 10. Juli 2019, 13:46 UhrYou 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]
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]