You executed the nuke.message instead of supplying it as an string - argument.
This should work: n = nuke.createNode('NoOp') goknob = nuke.PyScript_Knob('go', 'MyPyKnob') n.addKnob(goknob) goknob.setValue("nuke.message('hallo')") Daniel Hartlehnert <dah...@gmx.de> schrieb am Di., 1. Nov. 2016 um 10:02 Uhr: > Hi, > > i want to create a NoOp (via a Python Script) that has a Python Script > Knob. I have tried this code: > > n = nuke.createNode('NoOp') > goknob = nuke.PyScript_Knob(‚go', ‚MyPyKnob') > n.addKnob(goknob) > goknob.setValue(nuke.message('hallo‘)) > > This creates the NoOp and adds the button. But the button is also > immediately executed. How can i avoid this? > Furthermore, i get this error: > > TypeError: setCommand() argument 1 must be string, not None > > And lastly, if i press the button, nothing happens anymore. Related to the > TypeError i guess. > > > Thanks, > Daniel > > _______________________________________________ > Nuke-users mailing list > Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >
_______________________________________________ Nuke-users mailing list Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users