1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- # Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved.
-
- ## init.py
- ## loaded by nuke before menu.py
-
- import os
- import sys
- import KEnv
-
- nuke.pluginAddPath('./gizmos')
- nuke.pluginAddPath('./icons')
- nuke.pluginAddPath('./ndk')
-
- # KEnv
- try:
- project = os.getenv('PROJECT')
- except:
- project = "GEN"
-
- env = KEnv.create(PROJECT=project, APP_ID='nuke')
- PYTHON_LIBS_NUKE = env.get('PYTHON_LIBS_NUKE')
- FTRACK_API_PYTHONPATH = env.get('FTRACK_API_PYTHONPATH')
- # project path
- try:
- sys.path.insert(1, FTRACK_API_PYTHONPATH)
- except:
- "init.py: cannot find FTRACK_API_PYTHONPATH"
-
- try:
- sys.path.insert(1, PYTHON_LIBS_NUKE)
- except:
- "init.py: cannot find PYTHON_LIBS_NUKE"
-
- # Paths
- nuke_path = os.getenv('NUKE_PATH')
- plugin_path = os.path.join(nuke_path, 'plugins')
- icon_path = os.path.join(nuke_path, 'icons')
-
- # Plugins
- nuke.pluginAppendPath(plugin_path, icon_path)
-
- def filenameFix(s):
- s = s.replace("/Volumes/O/", "//calculon/o/", 1)
- s = s.replace("/Volumes/P/", "//hades/p/", 1)
- s = s.replace("O:/", "//calculon/o/", 1)
- s = s.replace("P:/", "//hades/p/", 1)
- s = s.replace("o:/", "//calculon/o/", 1)
- s = s.replace("p:/", "//hades/p/", 1)
- return s
-
- # Needs to be loaded last?
- import kellerPluginCore
- kellerPluginCore.start( os.path.join( nuke_path ,"pythonplugins") )
-
- import cryptomatte_utilities
- cryptomatte_utilities.setup_cryptomatte()
|