ID 523934 - When calling a channel name without specifying the layer name, the Expression node returns the first instance of the channel

Follow

Problem summary
When calling a channel name without specifying the layer name, the Expression node returns the first instance of the channel.
 
Customer reported version
Nuke 12.1v1
 
Customer reported platform
CentOS 8
 
Steps to reproduce
 
1) Open Nuke.
 
2) Open the channels dropdown in the Viewer and select new
 


 
3) Create a new layer named test and give it a channel named Z. Press OK.
 

 
Ensure this newly created layer is then selected in the Viewer dropdown.
 
4) Create a Shuffle node, downstream from the ColorBars, with the following setup:
 

 
5) Create an Expression node and connect it to the Shuffle node.
 
6) In the Expression node, change the channel0 knob to test.
 
7) Add Z as an expression on the expr0 knob:
 

 
8) Notice that this gives the incorrect result in the Viewer. This will be displaying the depth.Z channel.
 
9) Change the expression on the expr0 knob to test.Z and notice that the result in the Viewer changes - this will now be the correct result.
 
Expected behaviour
If you don’t specify the layer name, the Expression node should assume the channel is in the current layer, as specified by the channels knobs (channel0, channel1, etc.).
 
Actual behaviour
When calling a channel name without specifying the layer name, the Expression node returns the first instance of the channel.
 
Workaround
In the '=' fields (expr0, expr1, etc.), ensure that the layer name is being called as well. For example test.Z rather than Z.
 
Reproduced by support
This bug has been reproduced in:
Nuke 13.2v5 - Windows 10 - Linux CentOS 7
Nuke 12.0v1 - Windows 10 - Linux CentOS 7
Nuke 9.0v1 - Windows 10
 
Earliest version tested
Nuke 9.0v1
- This issue appears to be in all tested versions of the product
 

    We're sorry to hear that

    Please tell us why