how call input0 in python button

hi all,

sorry if my question seems to you stupid, but i ‘m new in python and new++ in nuke’s python.

i want to use the nuke.sample command by pressing a python script button for my gizmo but i dont find how call the himself input0

if i run this it’s work

Code:

n = nuke.createNode("ColorBars")
posX = 200
posY = 350
print nuke.sample(n,'rgba.blue',posX,posY)


but if try to run the sample function in a button i dont know how define the n variable … to refer of the image plug into the the first input.

somebody can light me ?

Thank,
papi

and sorry for my poor english

No Responses to “how call input0 in python button”

Post a Comment