ID 527198 - Layers on the Shuffle node are not set via Python, when it is executed from command line

Follow

Problem summary
Layers on the Shuffle node are not set via Python, when it is executed from command line.
 

The following error is also returned in command prompt:

Warning: Test is not a layer or channel name
 
Customer reported version
Nuke 13.1v4
 
Customer reported platform
macOS 12
 
Steps to reproduce
 
1) In Nuke, write out an EXR with an additional layer or download the attached EXR file.
 
2) Save the following code as a Python (.py) file, where path/to/folder/test.exr is the location of the EXR from step 1 and path/to/folder/shuffleTest.nk is where you will save the resulting .nk file.
 
nRead = nuke.nodes.Read(file='path/to/folder/test.exr')nLayer =nuke.nodes.Shuffle2(inputs=[nRead])nLayer['in1'].setValue('Test')nuke.scriptSave('path/to/folder/shuffleTest.nk')
 
NOTE: For versions previous to 12.1v1, where the Shuffle2 node does not exist, use the following code instead:
nRead = nuke.nodes.Read(file='path/to/folder/test.exr') nLayer =nuke.nodes.Shuffle(inputs=[nRead]) nLayer['in'].setValue('Test') nuke.scriptSave('path/to/folder/shuffleTest.nk')
 
3) Execute the Python script with one of the following commands, depending on your operating system:
Windows:
"C:\Program Files\Nuke14.0v1\Nuke14.0.exe" -t shuffleTest.py
 
Linux 
/usr/local/Nuke14.0v1/Nuke14.0 -t shuffleTest.py
 
macOS
/Applications/Nuke14.0v1/Nuke14.0v1.app/Contents/MacOS/Nuke14.0 -t shuffleTest.py
 
4) Open a GUI session of Nuke.
 
5) Open the .nk that has been saved (ie. path/to/folder/shuffleTest.nk)
 
6) Double click the Shuffle node and notice that the layer has not been set:
 

 
NOTE: Executing the following code in the Script Editor does set the layer as expected:
nRead = nuke.nodes.Read(file='path/to/folder/test.exr') nLayer =nuke.nodes.Shuffle2(inputs=[nRead]) nLayer['in1'].setValue('Test')
 
Expected behaviour
The layer on the Shuffle node should be set via Python, when executed from command line, like it is when executing similar code in the Script Editor.
 
Actual behaviour
After executing the Python script, the following error is returned in command prompt:
Warning: Test is not a layer or channel name
 
Then, when viewing the resulting .nk script in a GUI Nuke session, you can see that the layer has not been set:
 
Workaround
Unknown.
 
Reproduced by support
This bug has been reproduced in:
Nuke 14.0v1 - 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