mattjeanes

Untitled

Jan 10th, 2013
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.83 KB | None | 0 0
  1. @ECHO OFF
  2. REM
  3. REM Valve Source SDK - runmaya.bat
  4. REM
  5. REM This is an example .bat file that can be used to launch Maya with
  6. REM appropriate paths set.  Call with the version of Maya to run.
  7. REM
  8. REM e.g. runmaya.bat 2012
  9. REM
  10. REM It relies on the environment variable VPROJECT being set by the SDK Launcher.
  11. REM
  12. REM NOTE: It also assumes Maya is installed in the default location
  13. REM       Adjust as required
  14. REM
  15. REM %VTOOLS%/maya/scripts should be in your MAYA_SCRIPT_PATH
  16. REM %VTOOLS%/maya/icons should be in your XBMLANGPATH
  17. REM %VTOOLS%/maya/<MAYAVER>/plug-ins should be in your MAYA_PLUG_IN_PATH
  18. REM
  19. REM Where <MAYAVER> is the appropriate version of Maya you are running
  20.  
  21. SET MAYAVER=2012
  22.  
  23. REM
  24. REM vsMaster.mll looks for other Valve DLLs relative to the directory specified by %VPROJECT%.
  25. REM Specifically, it looks in %VPROJECT%/../bin for other Valve DLLs.  Valve uses an internal
  26. REM runtime linker and normally it looks relative to the path of the EXE running to find Valve DLLs.
  27. REM In the case of Maya, maya.exe is running from an arbitrary unrelated location so
  28. REM %VPROJECT% is used to locate the DLLs in the manner specified.
  29. REM
  30.  
  31. IF NOT EXIST "%VPROJECT%" GOTO ERROR_NO_VPROJECT
  32.  
  33. REM
  34. REM Workaround for maya installed in (x86) directory.
  35. REM
  36.  
  37. IF EXIST "%ProgramFiles(x86)%" GOTO x86
  38. SET PATH=E:/Programs/Autodesk/Maya%MAYAVER%/bin;%VGAME%/bin;%PATH%
  39. GOTO END
  40.  
  41. :x86
  42. SET PATH=E:/Programs/Autodesk/Maya%MAYAVER%/bin;%VGAME%/bin;%PATH%
  43.  
  44. :END
  45.  
  46. set MAYA_SCRIPT_PATH=%VTOOLS%/maya/scripts;%VTOOLS%/maya/scripts/valvesource;%VTOOLS%/maya/scripts/vstAttrPaint;%MAYA_SCRIPT_PATH%
  47. set XBMLANGPATH=%VTOOLS%/maya/icons;%XBMLANGPATH%
  48. set MAYA_PLUG_IN_PATH=%VTOOLS%/maya/%MAYAVER%/plug-ins;%MAYA_PLUG_IN_PATH%
  49.  
  50. maya
  51.  
  52. goto END
  53.  
  54. :ERROR_NO_VPROJECT
  55. echo ERROR! VPROJECT directory "%VPROJECT%" doesn't exist
  56. goto END
  57.  
  58.  
  59.  
  60. :END
Advertisement
Add Comment
Please, Sign In to add comment