Create a ticket State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:317671|
Problem summary Pythoncially setting Boolean value on Knob creation doesn't store the value correctlyCustomer reported version nuke.11.0v2Customer reported platform windows10Steps to reproduce 1) Launch Nuke
2) Run the following code in the Script Editor.
knob1 = nuke.Boolean_Knob('t1', 'Test1', True) knob2 = nuke.Boolean_Knob('t2', 'Test2', False) n = nuke.nodes.NoOp() n.addKnob( knob1 ) n.addKnob( knob2 )
This is create a NoOp with one knob checked and the other not. 3) Copy and Paste the NoOp, on the new nod, both knobs are now false/unchecked * The same thing happens after saving and reopening a Nuke script with the NoOpWorkaround
You have to set the value after creating the knob
knob1 = nuke.Boolean_Knob('t1', Test1') knob2.setValue(True)
Reproduced by support
Nuke 13.0v4 - Windows 10
Nuke11.0v2 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 11.0v1 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 10.5v6 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 10.5v1 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 10.0v6 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 10.0v1 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 9.0v9 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 9.0v1 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 8.0v6 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 8.0v1 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13 Nuke 7.0v10 - Windows 10 - Linux CentOS 6.9 - MacOS 10.13Earliest version tested Nuke 7.0v10 - This appears to affect all Nuke versionsExpected behaviour For the set boolean values to be storedActual behaviour After serialising the node, the boolean knob reverts back to the default value.