State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:422387|
Problem summary
Executing a Python script in Terminal mode, that generates a Write node and renders it, applies the incorrect colorspace to the rendered images.
Customer reported version
Nuke 11.3v4
Customer reported platform
CentOS 7
Steps to reproduce
1) Save the following code into a Python file.
import os
import sys
import nuke
def main(argv):
r = nuke.nodes.Read(file=argv[-1])
writePath = "/path/to/write/files" # change this string to the path you want to write the jpegs to
w = nuke.nodes.Write()
w.setInput(0, r)
w.knob("file").setValue(writePath+"/test.####.jpg")
w.knob("file_type").setValue("jpeg")
w.knob("_jpeg_quality").setValue(1.0)
w.knob("colorspace").setValue("Output - sRGB")
saveScript = os.path.join(os.path.dirname(w.knob("file").value()), 'repro_script.nk')
nuke.scriptSave(saveScript)
if __name__ == '__main__':
main(sys.argv)
2) Execute the Python script by running the following command in the Terminal:
nuke -t -x /path/to/python_script.py /path/to/source_file.exr
3) Open the .nk script that has been saved and compare it to the rendered jpeg. There is a noticeable difference in colour.
Expected behaviour
The rendered jpegs should be written out with the correct colorspace applied.
Actual behaviour
The rendered jpegs are written out with the wrong colorspace applied, when compared to the script that the Python code generates.
Workaround
If you write out a temporary .nk script, then render it, the images should be rendered as expected.
Reproduced by support
This bug has been reproduced in:
Nuke 12.0v4 - Windows 10 - Linux CentOS 7 - macOS 10.13 (High Sierra)
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 10 - Linux CentOS 6 - macOS 10.13 (High Sierra) - Regression
Unable to reproduce bug in:
Nuke 9.0v9 - Windows 10 - Linux CentOS 6 - macOS 10.13 (High Sierra)
Earliest version tested
Nuke 9.0v9
- This issue doesn't appear in this version and has regressed
We're sorry to hear that
Please tell us why