You can get the first input with node.input(0), e.g:
for i in nuke.selectedNodes():
first_input = i.input(0)
if first_input is not None:
i['label'].setValue(first_input.name())
On 10/06/13 20:40, atomcraft78 wrote:
Hi guys, got super simple question (I hope!) and I want to know how to
access the node connected to a selected node.
For example - I want to get the name, or the chanel from the above
connected node, like this:
*Code:*
for i in nuke.selectedNodes():
i['label'].setValue(str(-the name of the node this ones connected to-)
Any ideas?
Thanks!
Very Happy
------------------------------------------------------------------------
Chris Glew | Compositor
London UK.
www.chriglew.com <http://www.chriglew.com>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
--
ben dickson
2D TD | [email protected]
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python