this should do the trick

s=nuke.selectedNode()
y = s['ypos'].value()
x = s['xpos'].value()
s['knobChanged'].setValue('''
nuke.thisNode()['xpos'].setValue(x)
nuke.thisNode()['ypos'].setValue(y)''')

Just replace x,y with your value if needed. But in this exemple,
this will make the selectedNode unmovable after this code being
executed in the script editor

On Sun, Mar 4, 2012, at 18:28, adamchryDTS wrote:

Hi all,
Is there a way to lock the position of a node so that it can not
be moved by the user?
Thanks for any info.
  ____________________________________________________________

-A

_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python


-- 
  Hugo Léveillé
  TD Compositing, Vision Globale
  [email protected]

_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to