ID 518704 - Cryptomatte doesn't return cryptoLayerChoice values via Python, unless the node's control panel is open in the GUI

Follow

Problem summary
Cryptomatte doesn't return cryptoLayerChoice values via Python, unless the node's control panel is open in the GUI.
 
Customer reported version
Nuke 13.0v4
 
Customer reported platform
Windows 10
 
Steps to reproduce
 
1) Open Nuke.
 
2) Read in an image with Cryptomatte layers.
 
3) With the Read node selected, execute the following code in the Script Editor:

crypto_node = nuke.createNode("Cryptomatte") print(crypto_node['cryptoLayerChoice'].values()) 
This should print the knob values to the Script Editor.
 
4) Delete the Cryptomatte node.
 
5) With the Read node selected again, execute the following code in the Script Editor:
crypto_node = nuke.createNode("Cryptomatte", inpanel=False) print(crypto_node['cryptoLayerChoice'].values())
This will print an empty Python list.
 
 
Alternative steps to reproduce
 
1) Launch Nuke in terminal mode.
 
2) Create a Read node with the following command, where "path/to/file.exr"is the file path of your Cryptomatte EXR:
read = nuke.nodes.Read(file = "path/to/file.exr")
 
3) Create a Cryptomatte node with the folllowing command:
cryptomatte = nuke.createNode("Cryptomatte")
 
4) Connect the Cryptomatte downstream of the Read node:
cryptomatte.setInput(0, read) 
 
5) Lastly, execute the following command, which will print an empty Python list:
print(cryptomatte['cryptoLayerChoice'].values())
 
Expected behaviour
Cryptomatte should return cryptoLayerChoice values via Python, without requiring the node's control panel to be open in the GUI
 
Actual behaviour
Cryptomatte doesn't return cryptoLayerChoice values via Python, unless the node's control panel is open in the GUI
 
Workaround
Unknown.
 
Reproduced by support
This bug has been reproduced in:
Nuke 13.2v3 - Windows 10 - Linux CentOS 7
Nuke 13.0v1 - Windows 10 - Linux CentOS 7
 
Earliest version tested
Nuke 13.0v1
- This feature did not exist before this version
 

    We're sorry to hear that

    Please tell us why