Ah, thanks Nathan - I thought addAutoLabel() would only change the
'autolabel' hidden knob.

Googling some examples, this works better:

def AL():
    n=nuke.thisNode()
    label= '%s\n %s' %(n.name(), n['size'].value())
    return label

nuke.addAutolabel(AL, nodeClass='Blur')



On 2 May 2013 16:44, Nathan Rusch <[email protected]> wrote:

>   The behavior you’re seeing sounds like it’s in line with the intended
> callback behavior:
>
> "...If all of [the registered callbacks] return None, then
> nuke.thisNode().name() is used"
>
> -Nathan
>
>
>  *From:* Michael Garrett <[email protected]>
> *Sent:* Thursday, May 02, 2013 1:38 PM
> *To:* Nuke Python discussion <[email protected]>
> *Subject:* [Nuke-python] autoLabel is replacing name in dag
>
>
> I'm finding that an autoLabel is replacing the node name in the dag, for
> example:
>
>
>
> def AL():
>
>     blurSize=nuke.thisNode()['size'].value()
>
>     return blurSize
>
>
>  nuke.addAutolabel(AL, nodeClass='Blur')
>
>
>
> ...then create a Blur node.
>
>
>
> I'm on Windows 7, Nuke 7.0v5.
>
>
>
> Thanks,
>
> Michael
>
> ------------------------------
> _______________________________________________
> 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
>
>
_______________________________________________
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