Hi
I've written the below to select all connected nodes above, below, left or
right of the selected node.
Could anyone tell me why this wont select nodes that are equal to the xpos or
ypos.
Before I used nuke.selectConnectedNodes() it worked but now only seems to
select greater than even though I'm asking '>='
Thanks
H
def selectUpDown(direction):
sn = nuke.selectedNode()
nuke.selectConnectedNodes()
for i in nuke.selectedNodes():
if 'up'==direction:
if i['ypos'].value() >= sn['ypos'].value():
i['selected'].setValue(False)
elif 'down'==direction:
if i['ypos'].value() <= sn['ypos'].value():
i['selected'].setValue(False)
elif 'left'==direction:
if i['xpos'].value() >= sn['xpos'].value():
i['selected'].setValue(False)
elif 'right'==direction:
if i['xpos'].value() <= sn['xpos'].value():
i['selected'].setValue(False)
sn['selected'].setValue(True)
##########---- via menu.py--------##################
selectUpDown('right')
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python