ID 432865 - Using expressions on multiple DeepRead nodes results in them not being properly evaluated on render

Follow

Problem summary
Using expressions on multiple DeepRead nodes results in them not being properly evaluated on render. This can lead to black frames being rendered, when rendering in terminal mode.

This issue does not occur with standard Read nodes.

There is also a DeepRead node "Plugin Error" when using TCL expressions in a terminal mode render. For example:
ERROR: DeepRead: no plugin named "filename] ReaderDeep" found

Customer reported version
Nuke 12.1v2

Customer reported platform
CentOS 7

Steps to reproduce
1) To reproduce this issue, you will need two EXR files that contains Deep data. This will be easier to visualise with an EXR frames of solid colour.
2) Open Nuke and save the script in the same directory as your Deep EXRs. 
3) Create a NoOp in the Node Graph.
4) Add a filename knob to the NoOp node, this can be done with Drag-and-Drop knobs.
5) Add the following expression to the filename knob, this will point towards your Deep EXR.

[python {nuke.script_directory()}]/DeepImage1.exr

6) Create a DeepRead node, and enter the following expression for the file knob:

[value NoOp1.filename]

7) Copy this setup, so that you now have two DeepRead nodes and two NoOps. Ensure that NoOp2 points towards your second EXR frame, and change the expression on DeepRead2 so that it is linked to NoOp2.
8) Connect a DeepToImage downstream from the DeepRead1.
9) Create a Constant node and switch to multiple values for the color knob.
10) For each of the RGB values, add the following code to the knob (right click > Add Expression):

node = nuke.toNode('DeepToImage1')value = node.sample('red', 0, 0)ret = value

Changing the 'red' value to 'green' or 'blue' for the appropriate knobs.
11) Create a Write node and attach it the the Constant node. Set the file path to an appropriate location. Your script should now look like this:

​​

12) Save the script, and render it via the terminal by using a command like so:

nuke -x /path/to/some/script.nk

13) You should see an error like so:
ERROR: DeepRead: no plugin named "filename] ReaderDeep" found

Reading the EXRs back into Nuke will also show that the images are just black frames.

Expected behavior:
Expressions should be evaluated on render and the rendered files should match the image in the Viewer.

Actual behavior:
Expressions for multiple DeepRead nodes are evaluated on render and the rendered files do not match the image in the Viewer.
More recent versions of Nuke may render the file correctly, but the error may still occur:



Workaround:
Unknown.

Reproduced by Support in:
Nuke 12.1v2 - Windows 10 - macOS 10.13 (High Sierra) - Linux CentOS 7
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 10
Nuke 9.0v1 - Windows 10
Nuke 8.0v1 - Windows 10 - macOS 10.13 (High Sierra)

Earliest version tested:
Nuke 8.0v1 - This issue appears to be in all versions of the product

    We're sorry to hear that

    Please tell us why