Hi all,
I came across a strange error message while trying to set values on
checkboxes via knobChanged.
The following example works but throws this error: "TypeError:
setValue() argument 1 must be string or None, not bool"
Any idea why a boolean knob is not taking a bool value ? When setting a
bool I also can't deselect or move the node...
Supplying a str prevents the error message but breaks the code.
###### code
n = nuke.createNode('NoOp')
n.addKnob(nuke.Boolean_Knob('a', ' '))
n.addKnob(nuke.Boolean_Knob('b', ' '))
n['knobChanged'].setValue('''
print
n = nuke.thisNode()
k = nuke.thisKnob()
for cb in [n['a'],n['b']]:
cb.setValue(False)
k.setValue(True)
print cb.value()
''')
###### /code
Best,
Carl
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python