[Tutor] how to temporarily disable a function
Pete O'Connell
pedrooconnell at gmail.com
Thu Jul 28 03:58:01 CEST 2011
Hi I was wondering if there is a way to disable a function.
Hi have a GUI grid snapping function that I use in a program called Nuke
(the film compositing software)
Here is the function (which loads when Nuke loads):
#######################
def theAutoplaceSnap():
try:
nuke.thisNode().autoplace()
n = nuke.allNodes();
for i in n:
nuke.autoplaceSnap(i)
except:
pass
nuke.addOnUserCreate(theAutoplaceSnap)
###################################
I have many functions which get loaded, but this particular one needs to be
disabled when I am viewing another compositors script in the gui.
I have a python script editor in Nuke in which I can run code if need be to
run code on the fly.
Help
--
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110728/15df0685/attachment-0001.html>
More information about the Tutor
mailing list