Hello Nuke python enthusiasts. I am trying to have every node I create be
snapped to the grid as I create them. It is proving trickier thatn I
thought.
I have been working on variations on the code below which doesn't work I
assume because the node becomes selected after it is created. Maybe the node
needs to be an argument to the autosnap function?

################################################3
import nuke
def autoplaceSnapSelectedNodesOnUserCreate():
    m = nuke.selectedNodes()
    for i in m:
        nuke.autoplaceSnap(i)
if __name__ == '__main__':
    autoplaceSnapSelectedNodesOnUserCreate()


nuke.addOnUserCreate(autoplaceSnapSelectedNodesOnUserCreate)
########################################################################

Any Suggestions would be greatly appreciated
Pete
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to