That gets the name of the upstream nodes connected to input 0, or input
1 etc..
Pretty sure Aaron is asking how to get the input label, which I don't
think is exposed to Python (e.g to get "A" or "B" from a Merge node)
For plugins, I don't think this is possible.. For gizmos, you can do this:
labels = {}
with nuke.selectedNode():
for inp in nuke.allNodes("Input"):
num = int(inp['number'].value())
name = inp.name()
labels[name] = num
print labels # For the LightWrap node: {'A': 0, 'B': 1}
Hm, it would be nice if you could do this:
nuke.selectedNode().setInput("Camera", cam_node_obj)
..instead of .setInput(0, ...)
On 10/09/13 16:11, Diogo Girondi wrote:
*Python:*
[python nuke.thisNode().input(0).name()]
[python nuke.thisNode().input(1).name()]
*TCL*
[value this.input0.name <http://this.input0.name>]
[value this.input1.name <http://this.input1.name>]
cheers,
Diogo
On Tue, Sep 10, 2013 at 2:42 AM, aaron barclay <[email protected]
<mailto:[email protected]>> wrote:
Hi,
is it possible to access the name of a nodes input rather then its
index? In this case I have a group with "Camera" and "Image" as inputs
and want to know what the names are as I hook them up.
aaron.
_______________________________________________
Nuke-python mailing list
[email protected]
<mailto:[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
--
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