have you defined is as a function?
your setLabel.py should look something like this and be in your
nuke plugin path:
import nuke
def setLabel():
for n in nuke.selectedNodes():
n.knob('label').setValue( n['file'].value().split('/')[13])
On 7/20/12 at 3:03 PM, [email protected] (RP) wrote:
I found the solution to my own problem
I've changed it to
for n in nuke.selectedNodes():
n.knob('label').setValue( n['file'].value().split('/')[13])
this seems to work, but now I have new problem
I want to have this script has a tool from a drop down menu,
I've saved it as setlLabel.py in my plugins folder, and edited
my menu.py with
import setLabel
m.addCommand("Set Read Label", "setLabel.setLabel()")
But now nuke wont start
RP
-----
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/
nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python