ID 150390 - The Int_Knob gives a floating point number when copy and pasting a node, and becomes an Array_Knob upon saving the script

Follow

Problem Summary:
The Int_Knob gives a floating point number when copy and pasting a node, and becomes an Array_Knob upon saving the script.

Customer reported version:
Nuke 11.1v4

Customer reported platform:
CentOS 6

Steps to Reproduce:
1) From Nuke, open the Script Editor.

2) Copy/paste and run the following snippet of code in the Script Editor:

number_knob = nuke.Int_Knob("number", "number")number_knob.setValue(3)no_op = nuke.createNode("NoOp")no_op.addKnob(number_knob)print(nuke.selectedNode()["number"])print(nuke.selectedNode()["number"].value())nuke.nodeCopy(nukescripts.cut_paste_file())nuke.nodePaste(nukescripts.cut_paste_file())print(nuke.selectedNode()["number"])print(nuke.selectedNode()["number"].value())

3) View the output of the Script Editor.

4) Save and close the script.

5) Re-open the previously saved script.

6) Select the available node, and run this code in the Script Editor:

print type(nuke.selectedNode()['number'])

6) View the output of the Script Editor for the node.
 

Alternative Steps for Int_Knob as an Array_Knob:

1) From Nuke, create any node in the Node Graph. (i.e Blur)

2) Open the Properties bin of the created node, and right-click the menu to access the Manage User Knobs...

3) Select the dropdown for Add, and select the Integer knob... item.

   3a) Name the Integer knob 'test'.

4) Create the knob and select Done, then place a value in the text box of the knob.

5) Open the Script Editor and run the following code:

print type(nuke.selectedNode()['test']) 

6) View the output of the command in the Script Editor for 'Array_Knob'.


Workaround
There is no available workaround at this time.


Reproduced by support in:
Nuke 15.0v3 - Windows 11, macOS 13 Ventura
Nuke 14.1v1 - Windows 11
Nuke 14.0v1 - Windows 10
Nuke 13.0v1 - Windows 10
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 10, CentOS 7, macOS 10.13

Earliest version tested
Nuke 10.0v1 - This issue appears to be in all versions of the product

Expected behavior:
The Int_Knob should remain as is, and with integer numbers when called using python script.

Actual behavior:
The pythonically called Int_Knob becomes an Array_Knob when saving the script. Additionally, the Integer Knob... is an Array_knob at any other point when used for a custom User Knob.

    We're sorry to hear that

    Please tell us why