ID 606043 - The IArray_Knob/matrix size is not preserved when reloading a script or copy and pasting nodes with matrix values.

Follow

Problem summary
The IArray_Knob/matrix size is not preserved when reloading a script or copy and pasting nodes with matrix values.
 
Customer reported version
Nuke 15.2v4
 
Customer reported platform
Rocky 9
 
Steps to reproduce
1) In Nuke, open the Script Editor and run the following code:

node = nuke.createNode("NoOp") matrix = nuke.IArray_Knob("inputMatrix", "input Matrix", (4,4)) node.addKnob(matrix)
2) View the NoOp node's Properties, then copy/paste the node in the Node Graph.
3) Open the Properties of the 2nd NoOp node, observing the IArray__Knob's input matrix.
 
Alternatively:
1) Launch Nuke and add a Matrix node larger or smaller than 3x3.
2) Copy and paste the Matrix node, observing the matrix knobs available. 
 
Expected behavior
The same input matrix knobs and values should be present on the copied node.
 
Actual behavior
The IArray_Knob values are missing from the copied node. Additionally, when trying to access the value using the getValue() method, an array of 4 by 1 is returned. This also occurs with Matrix node and Array_Knob defaults to it's original settings of 3x3 and does not update for the latest knobs when copy/pasting the Matrix node in the Node Graph. 
 
Workaround
For the Matrix node, adding a value larger than zero to any of the array knobs allows the copy to commit the additional knobs.
 
Reproduced by Support in:
Nuke 16.0v4 - Windows 10/11, macOS 14
Nuke 14.0v1 - Windows 10/11, macOS 14
 
Earliest version tested
Nuke 14.0v1 - This issue appears to be in all tested versions of the product 

    We're sorry to hear that

    Please tell us why