Ei kuvausta
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.

projectFavorites.py 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import KEnv
  2. import os
  3. import nuke
  4. # KEnv
  5. try:
  6. project = os.getenv('PROJECT')
  7. except:
  8. project = "GEN"
  9. env = KEnv.create(PROJECT=project, APP_ID='nuke')
  10. projectID = env.get('PROJECT_ID')
  11. formats = env.get('IMAGEFORMATS')
  12. # 3D FOLDER
  13. WORK_3D_ROOT = env.get('WORK_3D_ROOT')
  14. RENDER_3D_ROOT = env.get('RENDER_3D_ROOT')
  15. PROCESSED_FOOTAGE_ROOT_3D = env.get('PROCESSED_FOOTAGE_ROOT_3D')
  16. # 2D FOLDER
  17. WORK_2D_ROOT = env.get('WORK_2D_ROOT')
  18. RENDER_2D_ROOT = env.get('RENDER_2D_ROOT')
  19. PROCESSED_FOOTAGE_ROOT_2D = env.get('PROCESSED_FOOTAGE_ROOT_2D')
  20. # GEN
  21. CAMERAS_ROOT = env.get('CAMERAS_ROOT')
  22. SETDATA_ROOT = env.get('SETDATA_ROOT')
  23. FAVOURITES = (
  24. ('WORK_3D_ROOT', WORK_3D_ROOT),
  25. ('RENDER_3D_ROOT', RENDER_3D_ROOT),
  26. ('PROCESSED_FOOTAGE_ROOT_3D', PROCESSED_FOOTAGE_ROOT_3D),
  27. ('WORK_2D_ROOT', WORK_2D_ROOT),
  28. ('RENDER_2D_ROOT', RENDER_2D_ROOT),
  29. ('PROCESSED_FOOTAGE_ROOT_2D', PROCESSED_FOOTAGE_ROOT_2D),
  30. ('CAMERAS_ROOT', CAMERAS_ROOT),
  31. ('SETDATA_ROOT', SETDATA_ROOT),
  32. )
  33. class projectFavorites(KellerNukePlugin):
  34. def configurePlugin(self):
  35. for (key, value) in FAVOURITES:
  36. nuke.addFavoriteDir(key,value)
  37. def unconfigurePlugin(self):
  38. for (key, value) in FAVOURITES:
  39. nuke.removeFavoriteDir(key)