State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:431707|
Problem summary
The value() method returns None for Linked_Knobs in a for-loop.
Customer reported version
Nuke 12.1v2
Customer reported platform
CentOS 7
Steps to reproduce
1) Open Nuke.
2) Create a NoOp node.
3) Add a Floating Point Slider knob, this can be done using Drag-and-Drop.
In older versions this is done by right clicking the node properties > Manage User Knobs > Add
4) With the NoOp selected, press Ctrl+G to add it to a new Group.
5) Expose the Floating Point slider, from the NoOp, to the top level of the Group - this can also be done with Drag-and-Drop.
However, in older versions, this is done by right clicking the node properties > Manage User Knobs > Pick
6) Run the following code in the Script Editor:
node=nuke.toNode("Group1")
for k in node.allKnobs():
print k.name(), k.Class()
print " ", k.value()
Expected behaviour
The value of the knob should be returned.
Actual behaviour
The value() method returns None.
Workaround
Using the getValue() method may work in some cases, however, in the case of Enumeration Knobs, getValue() will return the selected index as a float. It seems that using node.knob(k.name()).value() instead is more reliable:
node=nuke.toNode("Group1")
for k in node.allKnobs():
print k.name(), k.Class()
print " ", node.knob(k.name()).value()
print " ", k.getValue()
Reproduced by support
This bug has been reproduced in:
Nuke 12.1v2 - Windows 10 - macOS 10.13 (High Sierra) - Linux CentOS 7
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 10
Nuke 9.0v1 - Windows 10
Nuke 8.0v1 - Windows 10 - macOS 10.13 (High Sierra)
Earliest version tested
Nuke 8.0v1
- This issue appears to be in all versions of the product
We're sorry to hear that
Please tell us why