Hi all, I have a script that saves a backup of the current script before rendering, using the nuke.addBeforeRender callback. Example (temp) script:
def saveBackup(path): print path In my global init.py: import saveBackup backupPath = "D:/nuke_backup/" nuke.addBeforeRender(saveBackup.saveBackup, (backupPath) ) This all works as expected, but what if I want to override the backupPath in a show specific init.py (loaded after the global)? If I add the callback again to my show init.py (using a different path) I end up with a script that is run twice. What is the best way to get around this? I tried setting the backupPath as an environment variable, and then just changing the environment variable in the show specific init.py, and also removing the callback before adding it again, but none of those seems to work. Best regards, Simon ------------------------------- Simon Björk Compositor/TD +46 (0)70-2859503 www.bjorkvisuals.com
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python