I use to work with a guy who you knew could know this kind of stuff : Valentin Trasnea. So back then I asked him that question. Here's what he cooked for me so I could retrieve the name of the topnode, usually a Read node at the top of the tree. You can also change the ".name" for ".file" so it catches the file name. Unfortunately I couldn't make it work for the label.
[python -execlocal {ret = nuke.tcl("full_name [file tail [value [topnode].name]]")}] On Thu, Apr 23, 2015 at 8:23 AM, Erwan Leroy <er...@erwanleroy.com> wrote: > I've had similar issues in the past without ever finding a way to fix it. > Seems like expressions in text fields aren't being refreshed until the DAG > is being redrawn? > If anyone knows the answer to this I'm interested as well. > On 23 Apr 2015 19:56, "Justin GD" <j.grosde...@gmail.com> wrote: > >> Hi guys, >> >> I try to retrieve the name and label of the direct input to display it in >> the current node label. >> I tried using TCL: >> >> [value input.name] >> >> [value input.label] >> >> >> But this is not updating when changing the input in the nodeGraph. >> >> >> What is the best way to do it ? >> >> I tried using python: [python {...}] without any success. >> >> >> Cheers, >> >> Justin >> >> >> >> >> _______________________________________________ >> 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 >> >> > _______________________________________________ > 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 > > -- Bruno-Pierre Jobin
_______________________________________________ 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