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.

init.py 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved.
  2. ## init.py
  3. ## loaded by nuke before menu.py
  4. import os
  5. import sys
  6. import KEnv
  7. nuke.pluginAddPath('./gizmos')
  8. nuke.pluginAddPath('./icons')
  9. nuke.pluginAddPath('./ndk')
  10. # KEnv
  11. try:
  12. project = os.getenv('PROJECT')
  13. except:
  14. project = "GEN"
  15. env = KEnv.create(PROJECT=project, APP_ID='nuke')
  16. PYTHON_LIBS_NUKE = env.get('PYTHON_LIBS_NUKE')
  17. FTRACK_API_PYTHONPATH = env.get('FTRACK_API_PYTHONPATH')
  18. # project path
  19. try:
  20. sys.path.insert(1, FTRACK_API_PYTHONPATH)
  21. except:
  22. "init.py: cannot find FTRACK_API_PYTHONPATH"
  23. try:
  24. sys.path.insert(1, PYTHON_LIBS_NUKE)
  25. except:
  26. "init.py: cannot find PYTHON_LIBS_NUKE"
  27. # Paths
  28. nuke_path = os.getenv('NUKE_PATH')
  29. plugin_path = os.path.join(nuke_path, 'plugins')
  30. icon_path = os.path.join(nuke_path, 'icons')
  31. # Plugins
  32. nuke.pluginAppendPath(plugin_path, icon_path)
  33. def filenameFix(s):
  34. s = s.replace("/Volumes/O/", "//calculon/o/", 1)
  35. s = s.replace("/Volumes/P/", "//hades/p/", 1)
  36. s = s.replace("O:/", "//calculon/o/", 1)
  37. s = s.replace("P:/", "//hades/p/", 1)
  38. s = s.replace("o:/", "//calculon/o/", 1)
  39. s = s.replace("p:/", "//hades/p/", 1)
  40. return s
  41. # Needs to be loaded last?
  42. import kellerPluginCore
  43. kellerPluginCore.start( os.path.join( nuke_path ,"pythonplugins") )
  44. import cryptomatte_utilities
  45. cryptomatte_utilities.setup_cryptomatte()