No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

createWriteDir.py 704B

123456789101112131415161718192021
  1. # automatic folder generation
  2. class CreateWriteDir(KellerNukePlugin):
  3. def configurePlugin(self):
  4. nuke.knobDefault('Write.beforeRender','createWriteDir.createWriteDir()')
  5. nuke.knobDefault('DeepWrite.beforeRender', 'createWriteDir.createWriteDir()')
  6. def unconfigurePlugin(self):
  7. nuke.knobDefault('Write.beforeRender','')
  8. nuke.knobDefault('DeepWrite.beforeRender', '')
  9. def createWriteDir():
  10. import os
  11. file = nuke.filename(nuke.thisNode())
  12. dir = os.path.dirname(file)
  13. osdir = nuke.callbacks.filenameFilter(dir)
  14. #nuke.debug("createWriteDir: Creating writedir: %s" % osdir)
  15. try:
  16. os.makedirs(osdir)
  17. except OSError:
  18. pass