Hi all,

I'm adding some autolabels to nodes with nuke.addAutolabel(). The first
thing I noticed was that the user's label, if any, disappears. So, my
functions all return that if it exists, like in the below example. That
brings back the user's label but with one further problem: no more tcl
evaluation. I can't do [value myknob] in the label knob and have it
evaluate.

Any ideas?

Thanks,
Ean


########
def frameRangeAL():
    tn = nuke.thisNode()
    name = tn.name()
    first_frame = tn['first_frame'].value()
    last_frame = tn['last_frame'].value()
    label = [ '%s (%d-%d)' % (name, first_frame, last_frame)]
    user_label = tn['label'].value()
    if user_label:
        label.append(user_label)
    label = '\n'.join(label)
    return label

nuke.addAutolabel(frameRangeAL, nodeClass='FrameRange')
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to