Launch_Maya.bat 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. @echo off
  2. REM
  3. REM Copyright (c) Contributors to the Open 3D Engine Project.
  4. REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. REM
  6. REM SPDX-License-Identifier: Apache-2.0 OR MIT
  7. REM
  8. REM
  9. %~d0
  10. cd %~dp0
  11. PUSHD %~dp0
  12. echo ________________________________
  13. echo ~ calling PROJ_Env.bat
  14. :: Keep changes local
  15. SETLOCAL enableDelayedExpansion
  16. :: PY version Major
  17. IF "%DCCSI_PY_VERSION_MAJOR%"=="" (set DCCSI_PY_VERSION_MAJOR=2)
  18. echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR%
  19. :: PY version Major
  20. IF "%DCCSI_PY_VERSION_MINOR%"=="" (set DCCSI_PY_VERSION_MINOR=7)
  21. echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR%
  22. :: Maya Version
  23. IF "%DCCSI_MAYA_VERSION%"=="" (set DCCSI_MAYA_VERSION=2020)
  24. echo DCCSI_MAYA_VERSION = %DCCSI_MAYA_VERSION%
  25. :: if a local customEnv.bat exists, run it
  26. IF EXIST "%~dp0Project_Env.bat" CALL %~dp0Project_Env.bat
  27. echo ________________________________
  28. echo Launching Maya %DCCSI_MAYA_VERSION% for O3DE: %O3DE_PROJECT%...
  29. :::: Set Maya native project acess to this project
  30. ::set MAYA_PROJECT=%LY_PROJECT%
  31. ::echo MAYA_PROJECT = %MAYA_PROJECT%
  32. :: DX11 Viewport
  33. Set MAYA_VP2_DEVICE_OVERRIDE = VirtualDeviceDx11
  34. :: Default to the right version of Maya if we can detect it... and launch
  35. echo MAYA_BIN_PATH = %MAYA_BIN_PATH%
  36. IF EXIST "%MAYA_BIN_PATH%\Maya.exe" (
  37. start "" "%MAYA_BIN_PATH%\Maya.exe" %*
  38. ) ELSE (
  39. Where maya.exe 2> NUL
  40. IF ERRORLEVEL 1 (
  41. echo Maya.exe could not be found
  42. pause
  43. ) ELSE (
  44. start "" Maya.exe %*
  45. )
  46. )
  47. :: Return to starting directory
  48. POPD
  49. :END_OF_FILE
  50. exit /b 0