Problem summary
When creating a Pulldown_Knob through Python, it will call the PyPulldown_Knob command to use.
It appears that when this PyPulldown_Knob gets added via an AddUserKnob command to a node, the serialization will be incorrect and written as the wrong type ID.
This causes issues when the generated user knob is recreated, either through closing the script or duplicating the user knob's source node.
Customer reported version
nuke.n/a
Customer reported platform
Steps to reproduce
1) Open a new session of Nuke
2) Paste the following command into the Script Editor to generate a Pulldown_Knob example:
dot = nuke.nodes.Dot()k = nuke.Pulldown_Knob('test', 'test', {'A' :'print("one")', 'B':'print("two")', 'C':'print("three")'})dot.addKnob(k)
3) When the
Dot is created in the Node Graph, cycle through the three options in the knob and view the results in the Script Editor's feedback
4) Duplicate this
Dot note, and cycle through the three options as per the previous step.
Result: This copied iteration of the Pulldown_Knob integration causes an error when accessing the options.
Expected behaviour
The Pulldown_Knob should retain the correct type ID and able to be regenerated correctly when copied or reset
Actual behaviour
The Pulldown_Knob does not retain the correct type ID and causes an error is copied or reset.
Workaround
As the issue appears to be caused by the Python integration, an alternative would be to use TCL to set the knob
An example of this would be something similar to the following:
nuke.tcl('addUserKnob', '35 knob_name l "knob label" M {"" ""}')knob = node['knob_name']knob.setValues(map_of_TCL_commands)
Reproduced by support
Guidance: Have you reproduced the problem? In which versions have you reproduced the problem? DELETE THIS LINE
This bug has been reproduced in:
Nuke 13.0v1 - Windows 10 - MacOS 10.15.6 - CentOS 7
Nuke 12.2v1 - Windows 10
Nuke 12.1v1 - Windows 10
Nuke 12.0v1 - Windows 10
Nuke 11.3v1 - Windows 10
Nuke 11.2v1 - Windows 10
Nuke 11.1v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.5v1 - Windows 10
Nuke 10.0v1 - Windows 10
Nuke 9.0v1 - Windows 10 - MacOS - CentOS 7
Earliest version tested
Nuke 9.0v1
- This issue appears to be in all versions of the product