ID 574760 - The correct layer is not Viewed or written when selecting cryptoLayerChoice via Python with setValue() while the Properties bin is not open

Follow

Problem summary
The correct layer is not Viewed or written when selecting cryptoLayerChoice via Python with setValue() while the Properties bin is not open.
 
Customer reported version
Nuke 14.0v3
 
Customer reported platform
Windows 10
 
Steps to reproduce
1) In Nuke, read in a cryptomatte image with multiple layers.
2) Add a Cryptomatte node and select it.
3) Press 1 on the keyboard to View the node.
4) Close the Properties bin of the Cryptomatte node.
5) Open the Script Editor and run the command:
print(nuke.selectedNode()["cryptoLayerChoice"].setValue(1))
6) Observe any changes made in the Viewer after running the command.
7) Add a Write node and render the Cryptomatte node, observing output.
 
Expected behavior
The selected layer should be viewed and written correctly.
 
Actual behavior
The correct value is not selected when using Python to set the value of the Layer Selection knob (cryptoLayerChoice)
 
Workaround
Adding the commands to open and close the control panel helps to initiate the change:
node.showControlPanel() node.hideControlPanel()
 
Reproduced by Support in:
Nuke 15.0v4 - Windows 11, Rocky 9
Nuke 13.0v1 - Windows 10, CentOS 7
 
Earliest version tested
Nuke 13.0v1 - This issue appears to be in all tested versions of the product
 

    We're sorry to hear that

    Please tell us why