ID 522663 - Shuffle2 fromInput1 and fromInput2 knobs don't update when an input connection is added Pythonically

Follow

Problem summary
Shuffle2 fromInput1 and fromInput2 knobs don't update when an input connection is added Pythonically
 
The Shuffle node didn't have fromInput knobs, so didn't have this issue
 
Customer reported version
nuke.13.2v2
 
Customer reported platform
windows10
 
Steps to reproduce
 
1) Open Nuke

2) In the Script Editor, run the following code:
 

cb =  nuke.nodes.CheckerBoard2() cw =  nuke.nodes.ColorWheel() s2 = nuke.nodes.Shuffle2() s2.setInput(0,cb) s2.setInput(1,cw) print(s2.knob("fromInput1").value()) print(s2.knob("fromInput1").setValue(1)) print(s2.knob("fromInput2").value()) print(s2.knob("fromInput2").setValue(1)) 
 
Which creates the following script:
 

 
And prints the following:
 
# Result: {0} B False {0} B False 
 
Expected behaviour
For the fromInput1 and fromInput2 knobs to return both inputs and be able to set the input to the second input
 
Actual behaviour
Even though there are two inputs, only one is returned, and Nuke fails to set the the input to the second input
 
Workaround
Force the node to validate, so it recognises both inputs using node.forceValidate()
 
cb =  nuke.nodes.CheckerBoard2()cw =  nuke.nodes.ColorWheel()s2 = nuke.nodes.Shuffle2()s2.setInput(0,cb)s2.setInput(1,cw)##### THIS SECTION FAILS##################print(s2.knob("fromInput1").value())print(s2.knob("fromInput1").setValue(1))print(s2.knob("fromInput2").value())print(s2.knob("fromInput2").setValue(1))#########################################s2.forceValidate()##### THIS NOW WORKS ###################print(s2.knob("fromInput1").value())print(s2.knob("fromInput1").setValue(1))print(s2.knob("fromInput2").value())print(s2.knob("fromInput2").setValue(1))#########################################
 
Reproduced by support
This bug has been reproduced in:
Nuke 13.2v4 - Windows 10, CentOS 7, macOS Monterey
Nuke 12.1v1 - Windows 10, CentOS 7, macOS Monterey
 
Earliest version tested
Nuke 12.1v1 - The Shuffle2 did not exist before this version
 

    We're sorry to hear that

    Please tell us why