Launch_Maya_2020.bat 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. :: Launches maya with a bunch of local hooks for AtomTressFX (Hair) plugins
  10. :: ToDo: move all of this to a .json data driven boostrapping system
  11. @echo off
  12. %~d0
  13. cd %~dp0
  14. PUSHD %~dp0
  15. echo ________________________________
  16. echo ~ calling PROJ_Env.bat
  17. :: Keep changes local
  18. SETLOCAL enableDelayedExpansion
  19. :: PY version Major
  20. set DCCSI_PY_VERSION_MAJOR=2
  21. echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR%
  22. :: PY version Major
  23. set DCCSI_PY_VERSION_MINOR=7
  24. echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR%
  25. :: Maya Version
  26. set MAYA_VERSION=2020
  27. echo MAYA_VERSION = %MAYA_VERSION%
  28. :: if a local customEnv.bat exists, run it
  29. IF EXIST "%~dp0Project_Env.bat" CALL %~dp0Project_Env.bat
  30. echo ________________________________
  31. echo Launching Maya %MAYA_VERSION% for Lumberyard...
  32. :::: Set Maya native project acess to this project
  33. set MAYA_PROJECT=%LY_PROJECT_PATH%
  34. echo MAYA_PROJECT = %LY_PROJECT_PATH%
  35. :: DX11 Viewport
  36. Set MAYA_VP2_DEVICE_OVERRIDE = VirtualDeviceDx11
  37. :: add plug-in path to AtomTressFX
  38. set TRESSFX_PLUG_IN_PATH=%LY_DEV%\Gems\AtomTressFX\Tools\Maya
  39. :: also attached to maya's built-it env var
  40. set MAYA_PLUG_IN_PATH=%TRESSFX_PLUG_IN_PATH%;%MAYA_PLUG_IN_PATH%
  41. echo MAYA_PLUG_IN_PATH = %MAYA_PLUG_IN_PATH%
  42. :: configure local xgen data so we can store it with test data
  43. :: https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/Maya-CharEffEnvBuild/files/GUID-6ED517C7-7346-4A6E-A9CF-37D2B8511C36-htm.html
  44. Set XGEN_CONFIG_PATH=%LY_PROJECT_PATH%\AssetData
  45. echo XGEN_CONFIG_PATH = %XGEN_CONFIG_PATH%
  46. :: Default to the right version of Maya if we can detect it... and launch
  47. IF EXIST "%MAYA_LOCATION%\bin\Maya.exe" (
  48. start "" "%MAYA_LOCATION%\bin\Maya.exe" %*
  49. ) ELSE (
  50. Where maya.exe 2> NUL
  51. IF ERRORLEVEL 1 (
  52. echo Maya.exe could not be found
  53. pause
  54. ) ELSE (
  55. start "" Maya.exe %*
  56. )
  57. )
  58. :: Return to starting directory
  59. POPD
  60. :END_OF_FILE
  61. exit /b 0