Refactor DCCsi to work better with O3DE changes (#4226)
* moving files in refactor/re-org Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * dev env refactor/re-org Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * moving/re-org so we can deprate the SDK nomiclature Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * moving/re-org so we can deprate the SDK nomiclature Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * Refactoring env so I can replace SDK with Tools folder Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * re-org and prune, from SKD to Tools Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * Removing old .bat files from SDK Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * updated how to retreive PYTHONHOME Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * Can't use/set PYTHONHOME with DCC Tools Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * small refactor Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * repaired a missed typo (causes error) Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * Added missing EntityId.h include to FocusModeInterface.h Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * refactor additional LY to O3DE tags Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * Some design scaffold file stubs Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * stubbing in scaffold file pattern Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * Removal of corrupted prefabs Signed-off-by: Benjamin Black <benblac@amazon.com> * refactored config_utils to maintain py2.7 support for maya 2020 Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * refactored config_utils to maintain py2.7 support for maya 2020 Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * pruning and cleanup Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * .env is for local dev overrides Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * .env is for local dev overrides Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * clean up init and logging patterns Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * Core refactoring, config.py functional standalone Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * cleaned up some bad logging, fixed up boostrap Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * fixed validation errors Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * fix logging issue, tiddy up Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * tiddy up maya for .bat bootstraping and launch Signed-off-by: Jonny Gallowy <gallowj@amazon.com> * name stub, fix validation Signed-off-by: Jonny Gallowy <gallowj@amazon.com> Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> Co-authored-by: Benjamin Black <benblac@amazon.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Env_Dev.bat
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Sets up environment for Lumberyard DCC tools and code access
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCC Scripting Interface Core
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
:: Skip initialization if already completed
|
||||
IF "%DCCSI_ENV_INIT%"=="1" GOTO :END_OF_FILE
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
::SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ O3DE DCC Scripting Interface Environment ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
IF "%DCCSI_DEV_ENV%"=="" (set DCCSI_DEV_ENV=%~dp0)
|
||||
echo DCCSI_DEV_ENV = %DCCSI_DEV_ENV%
|
||||
|
||||
:: add to the PATH
|
||||
SET PATH=%DCCSI_DEV_ENV%;%PATH%
|
||||
|
||||
:: Constant Vars (Global)
|
||||
:: global debug flag (propogates)
|
||||
:: The intent here is to set and globally enter a debug mode
|
||||
IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=false)
|
||||
echo DCCSI_GDEBUG = %DCCSI_GDEBUG%
|
||||
:: initiates earliest debugger connection
|
||||
:: we support attaching to WingIDE... PyCharm and VScode in the future
|
||||
IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=false)
|
||||
echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE%
|
||||
:: sets debugger, options: WING, PYCHARM
|
||||
IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING)
|
||||
echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER%
|
||||
:: Default level logger will handle
|
||||
:: Override this to control the setting
|
||||
:: CRITICAL:50
|
||||
:: ERROR:40
|
||||
:: WARNING:30
|
||||
:: INFO:20
|
||||
:: DEBUG:10
|
||||
:: NOTSET:0
|
||||
IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=20)
|
||||
echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL%
|
||||
|
||||
:: This maps up to the \Dev folder
|
||||
IF "%O3DE_REL_PATH%"=="" (set O3DE_REL_PATH=..\..\..\..)
|
||||
echo O3DE_REL_PATH = %O3DE_REL_PATH%
|
||||
|
||||
:: You can define the project name
|
||||
IF "%O3DE_PROJECT%"=="" (
|
||||
for %%a in (%CD%..\..\..\..) do set O3DE_PROJECT=%%~na
|
||||
)
|
||||
echo O3DE_PROJECT = %O3DE_PROJECT%
|
||||
|
||||
:: set up the default project path (dccsi)
|
||||
:: if not set we also use the DCCsi path as stand-in
|
||||
CD /D ..\..\..\
|
||||
:: To Do: remove one of these
|
||||
IF "%O3DE_PROJECT_PATH%"=="" (set O3DE_PROJECT_PATH=%CD%)
|
||||
echo O3DE_PROJECT_PATH = %O3DE_PROJECT_PATH%
|
||||
|
||||
IF "%ABS_PATH%"=="" (set ABS_PATH=%CD%)
|
||||
echo ABS_PATH = %ABS_PATH%
|
||||
|
||||
:: Save current directory and change to target directory
|
||||
pushd %ABS_PATH%
|
||||
|
||||
:: Change to root Lumberyard dev dir
|
||||
CD /d %O3DE_PROJECT_PATH%\%O3DE_REL_PATH%
|
||||
IF "%O3DE_DEV%"=="" (set O3DE_DEV=%CD%)
|
||||
echo O3DE_DEV = %O3DE_DEV%
|
||||
:: Restore original directory
|
||||
popd
|
||||
|
||||
:: dcc scripting interface gem path
|
||||
:: currently know relative path to this gem
|
||||
set DCCSIG_PATH=%O3DE_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface
|
||||
echo DCCSIG_PATH = %DCCSIG_PATH%
|
||||
|
||||
:: Change to DCCsi root dir
|
||||
CD /D %DCCSIG_PATH%
|
||||
|
||||
:: per-dcc sdk path
|
||||
set DCCSI_TOOLS_PATH=%DCCSIG_PATH%\Tools
|
||||
echo DCCSI_TOOLS_PATH = %DCCSI_TOOLS_PATH%
|
||||
|
||||
:: temp log location specific to this gem
|
||||
set DCCSI_LOG_PATH=%O3DE_PROJECT_PATH%\.temp\logs
|
||||
echo DCCSI_LOG_PATH = %DCCSI_LOG_PATH%
|
||||
|
||||
:: O3DE build path
|
||||
IF "%O3DE_BUILD_FOLDER%"=="" (set O3DE_BUILD_FOLDER=build)
|
||||
echo O3DE_BUILD_FOLDER = %O3DE_BUILD_FOLDER%
|
||||
|
||||
IF "%O3DE_BUILD_PATH%"=="" (set O3DE_BUILD_PATH=%O3DE_DEV%\%O3DE_BUILD_FOLDER%)
|
||||
echo O3DE_BUILD_PATH = %O3DE_BUILD_PATH%
|
||||
|
||||
IF "%O3DE_BIN_PATH%"=="" (set O3DE_BIN_PATH=%O3DE_BUILD_PATH%\bin\profile)
|
||||
echo O3DE_BIN_PATH = %O3DE_BIN_PATH%
|
||||
|
||||
:: add to the PATH
|
||||
SET PATH=%O3DE_BIN_PATH%;%DCCSIG_PATH%;%PATH%
|
||||
|
||||
::ENDLOCAL
|
||||
|
||||
:: Set flag so we don't initialize dccsi environment twice
|
||||
SET DCCSI_ENV_INIT=1
|
||||
GOTO END_OF_FILE
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Sets up extended DCCsi environment for Maya
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCCsi Autodesk Maya Environment
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
:: Skip initialization if already completed
|
||||
IF "%DCCSI_ENV_MAYA_INIT%"=="1" GOTO :END_OF_FILE
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
IF "%DCCSI_PY_VERSION_MAJOR%"=="" (set DCCSI_PY_VERSION_MAJOR=2)
|
||||
IF "%DCCSI_PY_VERSION_MINOR%"=="" (set DCCSI_PY_VERSION_MINOR=7)
|
||||
IF "%DCCSI_PY_VERSION_RELEASE%"=="" (set DCCSI_PY_VERSION_RELEASE=11)
|
||||
|
||||
:: Default Maya Version
|
||||
IF "%DCCSI_MAYA_VERSION%"=="" (set DCCSI_MAYA_VERSION=2020)
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ O3DE DCCsi Autodesk Maya Environment ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR%
|
||||
echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR%
|
||||
echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE%
|
||||
echo DCCSI_MAYA_VERSION = %DCCSI_MAYA_VERSION%
|
||||
|
||||
:::: Set Maya native project acess to this project
|
||||
IF "%MAYA_PROJECT%"=="" (set MAYA_PROJECT=%O3DE_PROJECT%)
|
||||
echo MAYA_PROJECT = %MAYA_PROJECT%
|
||||
|
||||
:: maya sdk path
|
||||
set DCCSI_TOOLS_MAYA_PATH=%DCCSI_TOOLS_PATH%\DCC\Maya
|
||||
echo DCCSI_TOOLS_MAYA_PATH = %DCCSI_TOOLS_MAYA_PATH%
|
||||
|
||||
set MAYA_MODULE_PATH=%DCCSI_TOOLS_MAYA_PATH%;%MAYA_MODULE_PATH%
|
||||
echo MAYA_MODULE_PATH = %MAYA_MODULE_PATH%
|
||||
|
||||
:: Maya File Paths, etc
|
||||
:: https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Maya/files/Environment-Variables-File-path-variables-htm.html
|
||||
:::: Set Maya native project acess to this project
|
||||
IF "%MAYA_LOCATION%"=="" (set MAYA_LOCATION=%ProgramFiles%\Autodesk\Maya%DCCSI_MAYA_VERSION%)
|
||||
echo MAYA_LOCATION = %MAYA_LOCATION%
|
||||
|
||||
IF "%MAYA_BIN_PATH%"=="" (set MAYA_BIN_PATH=%MAYA_LOCATION%\bin)
|
||||
echo MAYA_BIN_PATH = %MAYA_BIN_PATH%
|
||||
|
||||
:: these improve the boot up time (Ha ... not really much)
|
||||
IF "%MAYA_DISABLE_CIP%"=="" (set MAYA_DISABLE_CIP=1)
|
||||
echo MAYA_DISABLE_CIP = %MAYA_DISABLE_CIP%
|
||||
|
||||
IF "%MAYA_DISABLE_CER%"=="" (set MAYA_DISABLE_CER=1)
|
||||
echo MAYA_DISABLE_CER = %MAYA_DISABLE_CER%
|
||||
|
||||
IF "%MAYA_DISABLE_CLIC_IPM%"=="" (set MAYA_DISABLE_CLIC_IPM=1)
|
||||
echo MAYA_DISABLE_CLIC_IPM = %MAYA_DISABLE_CLIC_IPM%
|
||||
|
||||
IF "%DCCSI_MAYA_SET_CALLBACKS%"=="" (set DCCSI_MAYA_SET_CALLBACKS=false)
|
||||
echo DCCSI_MAYA_SET_CALLBACKS = %DCCSI_MAYA_SET_CALLBACKS%
|
||||
|
||||
:: setting this to 1 should further improve boot time (I think)
|
||||
::IF "%MAYA_NO_CONSOLE_WINDOW%"=="" (set MAYA_NO_CONSOLE_WINDOW=0)
|
||||
::echo MAYA_NO_CONSOLE_WINDOW = %MAYA_NO_CONSOLE_WINDOW%
|
||||
:: But I like the console window for development and debugging early boot
|
||||
|
||||
:: shared location for 64bit DCCSI_PY_MAYA python location (2.7)
|
||||
set DCCSI_PY_MAYA=%MAYA_BIN_PATH%\mayapy.exe
|
||||
echo DCCSI_PY_MAYA = %DCCSI_PY_MAYA%
|
||||
|
||||
:: add to the PATH
|
||||
SET PATH=%MAYA_BIN_PATH%;%PATH%
|
||||
|
||||
:: Local DCCsi Maya plugins access (ours)
|
||||
set DCCSI_MAYA_PLUG_IN_PATH=%DCCSI_TOOLS_MAYA_PATH%\plugins
|
||||
:: also attached to maya's built-it env var
|
||||
set MAYA_PLUG_IN_PATH=%DCCSI_MAYA_PLUG_IN_PATH%;MAYA_PLUG_IN_PATH
|
||||
echo DCCSI_MAYA_PLUG_IN_PATH = %DCCSI_MAYA_PLUG_IN_PATH%
|
||||
|
||||
:: Local DCCsi Maya shelves (ours)
|
||||
set DCCSI_MAYA_SHELF_PATH=%DCCSI_TOOLS_MAYA_PATH%\Prefs\Shelves
|
||||
set MAYA_SHELF_PATH=%DCCSI_MAYA_SHELF_PATH%
|
||||
echo DCCSI_MAYA_SHELF_PATH = %DCCSI_MAYA_SHELF_PATH%
|
||||
|
||||
:: Local DCCsi Maya icons path (ours)
|
||||
set DCCSI_MAYA_XBMLANGPATH=%DCCSI_TOOLS_MAYA_PATH%\Prefs\icons
|
||||
:: also attached to maya's built-it env var
|
||||
set XBMLANGPATH=%DCCSI_MAYA_XBMLANGPATH%;%XBMLANGPATH%
|
||||
echo DCCSI_MAYA_XBMLANGPATH = %DCCSI_MAYA_XBMLANGPATH%
|
||||
|
||||
:: Local DCCsi Maya Mel scripts (ours)
|
||||
set DCCSI_MAYA_SCRIPT_MEL_PATH=%DCCSI_TOOLS_MAYA_PATH%\Scripts\Mel
|
||||
:: also attached to maya's built-it env var
|
||||
set MAYA_SCRIPT_PATH=%DCCSI_MAYA_SCRIPT_MEL_PATH%;%MAYA_SCRIPT_PATH%
|
||||
echo DCCSI_MAYA_SCRIPT_MEL_PATH = %DCCSI_MAYA_SCRIPT_MEL_PATH%
|
||||
|
||||
:: Local DCCsi Maya Python scripts (ours)
|
||||
set DCCSI_MAYA_SCRIPT_PY_PATH=%DCCSI_TOOLS_MAYA_PATH%\Scripts\Python
|
||||
:: also attached to maya's built-it env var
|
||||
set MAYA_SCRIPT_PATH=%DCCSI_MAYA_SCRIPT_PY_PATH%;%MAYA_SCRIPT_PATH%
|
||||
echo DCCSI_MAYA_SCRIPT_PY_PATH = %DCCSI_MAYA_SCRIPT_PY_PATH%
|
||||
|
||||
:: DCCsi Maya boostrap, userSetup.py access (ours)
|
||||
set DCCSI_MAYA_SCRIPT_PATH=%DCCSI_TOOLS_MAYA_PATH%\Scripts
|
||||
:: also attached to maya's built-it env var
|
||||
set MAYA_SCRIPT_PATH=%DCCSI_MAYA_SCRIPT_PATH%;%MAYA_SCRIPT_PATH%
|
||||
echo DCCSI_MAYA_SCRIPT_PATH = %DCCSI_MAYA_SCRIPT_PATH%
|
||||
|
||||
echo MAYA_SCRIPT_PATH = %MAYA_SCRIPT_PATH%
|
||||
|
||||
:: add all python related paths to PYTHONPATH for package imports
|
||||
set PYTHONPATH=%DCCSI_MAYA_SCRIPT_PATH%;%DCCSI_MAYA_SCRIPT_PY_PATH%;%PYTHONPATH%
|
||||
echo PYTHONPATH = %PYTHONPATH%
|
||||
|
||||
:: DX11 Viewport
|
||||
Set MAYA_VP2_DEVICE_OVERRIDE=VirtualDeviceDx11
|
||||
echo MAYA_VP2_DEVICE_OVERRIDE = %MAYA_VP2_DEVICE_OVERRIDE%
|
||||
|
||||
::ENDLOCAL
|
||||
|
||||
:: Set flag so we don't initialize dccsi environment twice
|
||||
SET DCCSI_ENV_MAYA_INIT=1
|
||||
GOTO END_OF_FILE
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Sets up environment for Lumberyard DCC tools and code access
|
||||
|
||||
:: Skip initialization if already completed
|
||||
IF "%DCCSI_ENV_PYCHARM_INIT%"=="1" GOTO :END_OF_FILE
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: version Major
|
||||
SET PYCHARM_VERSION_YEAR=2020
|
||||
:: version Major
|
||||
SET PYCHARM_VERSION_MAJOR=2
|
||||
|
||||
::"C:\Program Files\JetBrains\PyCharm 2019.1.3\bin"
|
||||
::"C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.5\bin\pycharm64.exe"
|
||||
|
||||
:: put project env variables/paths here
|
||||
set PYCHARM_HOME=%PROGRAMFILES%\JetBrains\PyCharm %PYCHARM_VERSION_YEAR%.%PYCHARM_VERSION_MAJOR%
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Qt.bat
|
||||
|
||||
:: Wing and other IDEs probably prefer access directly to the python.exe
|
||||
set DCCSI_PY_IDE = %O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python
|
||||
echo DCCSI_PY_IDE = %DCCSI_PY_IDE%
|
||||
|
||||
:: ide and debugger plug
|
||||
set DCCSI_PY_DEFAULT=%DCCSI_PY_IDE%\python.exe
|
||||
|
||||
SET PYCHARM_PROJ=%DCCSIG_PATH%\Solutions
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ Setting up O3DE DCCsi Dev Env PyCharm %PYCHARM_VERSION_YEAR%.%PYCHARM_VERSION_MAJOR%.%PYCHARM_VERSION_MINOR%
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo PYCHARM_VERSION_YEAR = %PYCHARM_VERSION_YEAR%
|
||||
echo PYCHARM_VERSION_MAJOR = %PYCHARM_VERSION_MAJOR%
|
||||
echo PYCHARM_HOME = %PYCHARM_HOME%
|
||||
echo PYCHARM_PROJ = %PYCHARM_PROJ%
|
||||
|
||||
:: Set flag so we don't initialize dccsi environment twice
|
||||
SET DCCSI_ENV_PYCHARM_INIT=1
|
||||
GOTO END_OF_FILE
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Sets up extended environment for O3DE and DCCsi python
|
||||
|
||||
:: Skip initialization if already completed
|
||||
IF "%DCCSI_ENV_PY_INIT%"=="1" GOTO :END_OF_FILE
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
CALL %~dp0\Env_Core.bat
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ O3DE DCCsi Python Environment ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
:: Python Version
|
||||
:: Ideally these are set to match the O3DE python distribution
|
||||
:: <O3DE>\python\runtime
|
||||
IF "%DCCSI_PY_VERSION_MAJOR%"=="" (set DCCSI_PY_VERSION_MAJOR=3)
|
||||
echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR%
|
||||
|
||||
:: PY version Major
|
||||
IF "%DCCSI_PY_VERSION_MINOR%"=="" (set DCCSI_PY_VERSION_MINOR=7)
|
||||
echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR%
|
||||
|
||||
IF "%DCCSI_PY_VERSION_RELEASE%"=="" (set DCCSI_PY_VERSION_RELEASE=10)
|
||||
echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE%
|
||||
|
||||
:: shared location for 64bit python 3.7 DEV location
|
||||
:: this defines a DCCsi sandbox for lib site-packages by version
|
||||
:: <O3DE>\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\3rdParty\Python\Lib
|
||||
set DCCSI_PYTHON_PATH=%DCCSIG_PATH%\3rdParty\Python
|
||||
echo DCCSI_PYTHON_PATH = %DCCSI_PYTHON_PATH%
|
||||
|
||||
:: add access to a Lib location that matches the py version (example: 3.7.x)
|
||||
:: switch this for other python versions like maya (2.7.x)
|
||||
IF "%DCCSI_PYTHON_LIB_PATH%"=="" (set DCCSI_PYTHON_LIB_PATH=%DCCSI_PYTHON_PATH%\Lib\%DCCSI_PY_VERSION_MAJOR%.x\%DCCSI_PY_VERSION_MAJOR%.%DCCSI_PY_VERSION_MINOR%.x\site-packages)
|
||||
echo DCCSI_PYTHON_LIB_PATH = %DCCSI_PYTHON_LIB_PATH%
|
||||
|
||||
:: add to the PATH
|
||||
SET PATH=%DCCSI_PYTHON_LIB_PATH%;%PATH%
|
||||
|
||||
:: shared location for default O3DE python location
|
||||
set O3DE_PYTHON_INSTALL=%O3DE_DEV%\python
|
||||
echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL%
|
||||
|
||||
:: location for O3DE python 3.7 location
|
||||
:: Note, many DCC tools (like Maya) include thier own python interpretter
|
||||
:: Some DCC apps may not operate correctly if PYTHONHOME is set (this is definitely the case with Maya)
|
||||
:: Be aware the python.cmd below does set PYTHONHOME
|
||||
set DCCSI_PY_BASE=%O3DE_PYTHON_INSTALL%\python.cmd
|
||||
echo DCCSI_PY_BASE = %DCCSI_PY_BASE%
|
||||
|
||||
CALL %O3DE_PYTHON_INSTALL%\get_python_path.bat
|
||||
|
||||
:: Some IDEs like Wing, may in some cases need acess directly to the exe to operate correctly
|
||||
IF "%DCCSI_PY_IDE%"=="" (set DCCSI_PY_IDE=%O3DE_PYTHONHOME%\python.exe)
|
||||
echo DCCSI_PY_IDE = %DCCSI_PY_IDE%
|
||||
|
||||
:: add to the PATH
|
||||
SET PATH=%O3DE_PYTHON_INSTALL%;%O3DE_PYTHONHOME%;%DCCSI_PY_IDE%;%PATH%
|
||||
|
||||
:: add all python related paths to PYTHONPATH for package imports
|
||||
set PYTHONPATH=%DCCSIG_PATH%;%DCCSI_PYTHON_LIB_PATH%;%O3DE_BUILD_PATH%;%PYTHONPATH%
|
||||
echo PYTHONPATH = %PYTHONPATH%
|
||||
|
||||
:: Set flag so we don't initialize dccsi environment twice
|
||||
SET DCCSI_ENV_PY_INIT=1
|
||||
GOTO END_OF_FILE
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Skip initialization of QT if already completed
|
||||
IF "%DCCSI_ENV_QT_INIT%"=="1" GOTO :END_OF_FILE
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
|
||||
::SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ O3DE DCCsi Qt/PySide2 Environment ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
:: These need to be ADDED to any env or launcher that needs Qt/PySide2 access
|
||||
:: This bootstraps O3DE Qt binaraies and PySide2 packages (which likely won't work in other versions of python)
|
||||
:: If you set these in the env.bat it may cause some Qt apps like WingIDE from starting correctly (Wing is a Qt app)
|
||||
:: Those apps provide their own Qt bins and Pyside packages (Wing, Substance, Maya, etc.)
|
||||
:: set up Qt/Pyside paths
|
||||
|
||||
:: set up PySide2/Shiboken
|
||||
set QTFORPYTHON_PATH=%O3DE_DEV%\Gems\QtForPython\3rdParty\pyside2\windows\release
|
||||
echo QTFORPYTHON_PATH = %QTFORPYTHON_PATH%
|
||||
|
||||
:: add to the PATH
|
||||
SET PATH=%QTFORPYTHON_PATH%;%PATH%
|
||||
SET PYTHONPATH=%QTFORPYTHON_PATH%;%PYTHONPATH%
|
||||
|
||||
set QT_PLUGIN_PATH=%O3DE_BUILD_PATH%\bin\profile\EditorPlugins
|
||||
echo QT_PLUGIN_PATH = %QT_PLUGIN_PATH%
|
||||
|
||||
:: add to the PATH
|
||||
SET PATH=%QT_PLUGIN_PATH%;%PATH%
|
||||
SET PYTHONPATH=%QT_PLUGIN_PATH%;%PYTHONPATH%
|
||||
|
||||
set O3DE_BIN_PATH=%O3DE_BUILD_PATH%\bin\profile
|
||||
echo O3DE_BIN_PATH = %O3DE_BIN_PATH%
|
||||
SET PATH=%O3DE_BIN_PATH%;%PATH%
|
||||
|
||||
::ENDLOCAL
|
||||
|
||||
:: Set flag so we don't initialize dccsi environment twice
|
||||
SET DCCSI_ENV_QT_INIT=1
|
||||
GOTO END_OF_FILE
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Sets up environment for Lumberyard DCC tools and code access
|
||||
|
||||
:: Skip initialization if already completed
|
||||
IF "%DCCSI_ENV_SUBSTANCE_INIT%"=="1" GOTO :END_OF_FILE
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
|
||||
::SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ O3DE DCCsi Adobe Substance Environment ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
: Substance Designer
|
||||
:: maya sdk path
|
||||
set DCCSI_SUBSTANCE_PATH=%DCCSI_TOOLS_PATH%\Substance
|
||||
echo DCCSI_SUBSTANCE_PATH = %DCCSI_SUBSTANCE_PATH%
|
||||
:: https://docs.substance3d.com/sddoc/project-preferences-107118596.html#ProjectPreferences-ConfigurationFile
|
||||
:: Path to .exe, "C:\Program Files\Allegorithmic\Substance Designer\Substance Designer.exe"
|
||||
set SUBSTANCE_PATH="%ProgramFiles%\Allegorithmic\Substance Designer"
|
||||
echo SUBSTANCE_PATH = %SUBSTANCE_PATH%
|
||||
|
||||
:: default config
|
||||
set SUBSTANCE_CFG_PATH=%O3DE_PROJECT_PATH%\DCCsi_default.sbscfg
|
||||
echo SUBSTANCE_CFG_PATH = %SUBSTANCE_CFG_PATH%
|
||||
|
||||
::ENDLOCAL
|
||||
|
||||
:: Set flag so we don't initialize dccsi environment twice
|
||||
SET DCCSI_ENV_SUBSTANCE_INIT=1
|
||||
GOTO END_OF_FILE
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Sets up environment for Lumberyard DCC tools and code access
|
||||
|
||||
:: Skip initialization if already completed
|
||||
IF "%DCCSI_ENV_VSCODE_INIT%"=="1" GOTO :END_OF_FILE
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Qt.bat
|
||||
|
||||
::SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
:: vscode has either a user install or a system install
|
||||
:: https://code.visualstudio.com/#alt-downloads
|
||||
:: that will change the paths assumed in this launcher (assume system install)
|
||||
:: vscode envars: https://code.visualstudio.com/docs/editor/variables-reference
|
||||
|
||||
SET VSCODE_WRKSPC=%DCCSIG_PATH%\Solutions\.vscode\dccsi.code-workspace
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ O3DE DCCsi WingIDE Environment ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo VSCODE_WRKSPC = %VSCODE_WRKSPC%
|
||||
|
||||
::ENDLOCAL
|
||||
|
||||
:: Set flag so we don't initialize dccsi environment twice
|
||||
SET DCCSI_ENV_VSCODE_INIT=1
|
||||
GOTO END_OF_FILE
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Sets up environment for Lumberyard DCC tools and code access
|
||||
|
||||
:: Skip initialization if already completed
|
||||
IF "%DCCSI_ENV_WINGIDE_INIT%"=="1" GOTO :END_OF_FILE
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: WingIDE version Major
|
||||
IF "%DCCSI_WING_VERSION_MAJOR%"=="" (set DCCSI_WING_VERSION_MAJOR=7)
|
||||
:: WingIDE version Major
|
||||
IF "%DCCSI_WING_VERSION_MINOR%"=="" (set DCCSI_WING_VERSION_MINOR=1)
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Qt.bat
|
||||
|
||||
:: put project env variables/paths here
|
||||
set WINGHOME=%PROGRAMFILES(X86)%\Wing Pro %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR%
|
||||
SET WING_PROJ=%DCCSIG_PATH%\Tools\Dev\Windows\Solutions\.wing\DCCsi_%DCCSI_WING_VERSION_MAJOR%x.wpr
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ O3DE DCCsi WingIDE Environment ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo DCCSI_WING_VERSION_MAJOR = %DCCSI_WING_VERSION_MAJOR%
|
||||
echo DCCSI_WING_VERSION_MINOR = %DCCSI_WING_VERSION_MINOR%
|
||||
echo WINGHOME = %WINGHOME%
|
||||
echo WING_PROJ = %WING_PROJ%
|
||||
|
||||
:: add to the PATH
|
||||
SET PATH=%WINGHOME%;%PATH%
|
||||
|
||||
:: Set flag so we don't initialize dccsi environment twice
|
||||
SET DCCSI_ENV_WINGIDE_INIT=1
|
||||
GOTO END_OF_FILE
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Set up and run LY Python CMD prompt
|
||||
:: Sets up the DccScriptingInterface_Env,
|
||||
:: Puts you in the CMD within the dev environment
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCC Scripting Interface Cmd
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ O3DE DCCsi CMD ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Qt.bat
|
||||
CALL %~dp0\Env_Maya.bat
|
||||
CALL %~dp0\Env_Substance.bat
|
||||
CALL %~dp0\Env_WingIDE.bat
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
:: Change to root dir
|
||||
CD /D %O3DE_PROJECT_PATH%
|
||||
|
||||
:: Create command prompt with environment
|
||||
CALL %windir%\system32\cmd.exe
|
||||
|
||||
ENDLOCAL
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCCsi GEM PyCharm
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: Constant Vars (Global)
|
||||
:: global debug (propogates)
|
||||
IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True)
|
||||
echo DCCSI_GDEBUG = %DCCSI_GDEBUG%
|
||||
:: initiates debugger connection
|
||||
IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True)
|
||||
echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE%
|
||||
:: sets debugger, options: WING, PYCHARM
|
||||
IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING)
|
||||
echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER%
|
||||
:: Default level logger will handle
|
||||
:: CRITICAL:50
|
||||
:: ERROR:40
|
||||
:: WARNING:30
|
||||
:: INFO:20
|
||||
:: DEBUG:10
|
||||
:: NOTSET:0
|
||||
IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10)
|
||||
echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL%
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_PyCharm.bat
|
||||
CALL %~dp0\Env_Maya.bat
|
||||
|
||||
set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA%
|
||||
|
||||
:: add prefered python to the PATH
|
||||
set PATH=%DCCSI_PY_DEFAULT%;%PATH%
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ Launching DCCsi Project in PyCharm %PYCHARM_VER_YEAR%.%PYCHARM_VER_MAJOR%.%PYCHARM_VER_MINOR% ...
|
||||
echo ~ MayaPy.exe (default python interpreter)
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo O3DE_DEV = %O3DE_DEV%
|
||||
|
||||
:: shared location for default O3DE python location
|
||||
set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python
|
||||
echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL%
|
||||
|
||||
:: Wing and other IDEs probably prefer access directly to the python.exe
|
||||
set DCCSI_PY_IDE = %O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python
|
||||
echo DCCSI_PY_IDE = %DCCSI_PY_IDE%
|
||||
|
||||
:: ide and debugger plug
|
||||
set DCCSI_PY_BASE=%DCCSI_PY_IDE%\python.exe
|
||||
echo DCCSI_PY_BASE = %DCCSI_PY_BASE%
|
||||
|
||||
:: ide and debugger plug
|
||||
set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA%
|
||||
echo DCCSI_PY_DEFAULT = %DCCSI_PY_DEFAULT%
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
echo.
|
||||
|
||||
:: Change to root dir
|
||||
CD /D %O3DE_PROJECT_PATH%
|
||||
|
||||
IF EXIST "%PYCHARM_HOME%\bin\pycharm64.exe" (
|
||||
start "" "%PYCHARM_HOME%\bin\pycharm64.exe" "%PYCHARM_PROJ%"
|
||||
) ELSE (
|
||||
Where pycharm64.exe 2> NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo pycharm64.exe could not be found
|
||||
pause
|
||||
) ELSE (
|
||||
start "" pycharm64.exe "%PYCHARM_PROJ%"
|
||||
)
|
||||
)
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
:: Default Maya and Python version
|
||||
set MAYA_VERSION=2020
|
||||
set DCCSI_PY_VERSION_MAJOR=2
|
||||
set DCCSI_PY_VERSION_MINOR=7
|
||||
set DCCSI_PY_VERSION_RELEASE=11
|
||||
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Maya.bat
|
||||
|
||||
:: ide and debugger plug
|
||||
set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA%
|
||||
|
||||
:: Default BASE DCCsi python 3.7 location
|
||||
:: Can be overridden (example, Launch_mayaPy_2020.bat :: MayaPy.exe)
|
||||
set DCCSI_PY_DCCSI=%DCCSI_LAUNCHERS_PATH%Launch_mayaPy_2020.bat
|
||||
echo DCCSI_PY_DCCSI = %DCCSI_PY_DCCSI%
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo Launching Maya %MAYA_VERSION% for O3DE DCCsi...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo MAYA_VERSION = %MAYA_VERSION%
|
||||
echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR%
|
||||
echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR%
|
||||
echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE%
|
||||
echo MAYA_LOCATION = %MAYA_LOCATION%
|
||||
echo MAYA_BIN_PATH = %MAYA_BIN_PATH%
|
||||
|
||||
:: Change to root dir
|
||||
CD /D %O3DE_PROJECT_PATH%
|
||||
|
||||
:: Default to the right version of Maya if we can detect it... and launch
|
||||
IF EXIST "%MAYA_BIN_PATH%\maya.exe" (
|
||||
start "" "%MAYA_BIN_PATH%\maya.exe" %*
|
||||
) ELSE (
|
||||
Where maya.exe 2> NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo Maya.exe could not be found
|
||||
pause
|
||||
) ELSE (
|
||||
start "" Maya.exe %*
|
||||
)
|
||||
)
|
||||
|
||||
::ENDLOCAL
|
||||
|
||||
:: Restore previous directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCCsi GEM PyCharm
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: Constant Vars (Global)
|
||||
:: global debug (propogates)
|
||||
IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True)
|
||||
echo DCCSI_GDEBUG = %DCCSI_GDEBUG%
|
||||
:: initiates debugger connection
|
||||
IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True)
|
||||
echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE%
|
||||
:: sets debugger, options: WING, PYCHARM
|
||||
IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING)
|
||||
echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER%
|
||||
:: Default level logger will handle
|
||||
:: CRITICAL:50
|
||||
:: ERROR:40
|
||||
:: WARNING:30
|
||||
:: INFO:20
|
||||
:: DEBUG:10
|
||||
:: NOTSET:0
|
||||
IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10)
|
||||
echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL%
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_PyCharm.bat
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ Launching DCCsi Project in PyCharm %PYCHARM_VERSION_YEAR%.%PYCHARM_VERSION_MAJOR% ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
IF EXIST "%PYCHARM_HOME%\bin\pycharm64.exe" (
|
||||
start "" "%PYCHARM_HOME%\bin\pycharm64.exe" "%PYCHARM_PROJ%"
|
||||
) ELSE (
|
||||
Where pycharm64.exe 2> NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo pycharm64.exe could not be found
|
||||
pause
|
||||
) ELSE (
|
||||
start "" pycharm64.exe "%PYCHARM_PROJ%"
|
||||
)
|
||||
)
|
||||
|
||||
ENDLOCAL
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
@echo off
|
||||
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Set up and run LY Python CMD prompt
|
||||
:: Sets up the DccScriptingInterface_Env,
|
||||
:: Puts you in the CMD within the dev environment
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCC Scripting Interface Py Min CMD
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ O3DE DCC Scripting Interface, Py Min Env CMD ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
:: Change to root dir
|
||||
CD /D %O3DE_PROJECT_PATH%
|
||||
|
||||
:: Create command prompt with environment
|
||||
CALL %windir%\system32\cmd.exe
|
||||
|
||||
ENDLOCAL
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
@echo off
|
||||
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Set up and run LY Python CMD prompt
|
||||
:: Sets up the DccScriptingInterface_Env,
|
||||
:: Puts you in the CMD within the O3DE_DEV environment
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCC Scripting Interface Py Qt Cmd
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Qt.bat
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ LY DCC Scripting Interface, Py Qt Env CMD ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
:: Change to root dir
|
||||
CD /D %O3DE_PROJECT_PATH%
|
||||
|
||||
:: Create command prompt with environment
|
||||
CALL %windir%\system32\cmd.exe
|
||||
|
||||
ENDLOCAL
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
@echo off
|
||||
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Launches VScode and the DccScriptingInterface Project Files
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCC Scripting Interface VScode
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ Setting up O3DE DCCsi VScode Dev Env...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: Constant Vars (Global)
|
||||
:: global debug (propogates)
|
||||
IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True)
|
||||
echo DCCSI_GDEBUG = %DCCSI_GDEBUG%
|
||||
:: initiates debugger connection
|
||||
IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True)
|
||||
echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE%
|
||||
:: sets debugger, options: WING, PYCHARM
|
||||
IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING)
|
||||
echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER%
|
||||
:: Default level logger will handle
|
||||
:: CRITICAL:50
|
||||
:: ERROR:40
|
||||
:: WARNING:30
|
||||
:: INFO:20
|
||||
:: DEBUG:10
|
||||
:: NOTSET:0
|
||||
IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10)
|
||||
echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL%
|
||||
|
||||
:: Initialize envCALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Qt.bat
|
||||
CALL %~dp0\Env_Maya.bat
|
||||
CALL %~dp0\Env_Substance.bat
|
||||
CALL %~dp0\Env_VScode.bat
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ Launching DCCsi Project in VScode
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo O3DE_DEV = %O3DE_DEV%
|
||||
|
||||
:: shared location for default O3DE python location
|
||||
set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python
|
||||
echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL%
|
||||
|
||||
:: Wing and other IDEs probably prefer access directly to the python.exe
|
||||
set DCCSI_PY_IDE = %O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python
|
||||
echo DCCSI_PY_IDE = %DCCSI_PY_IDE%
|
||||
|
||||
:: ide and debugger plug
|
||||
set DCCSI_PY_BASE=%DCCSI_PY_IDE%\python.exe
|
||||
echo DCCSI_PY_BASE = %DCCSI_PY_BASE%
|
||||
|
||||
:: ide and debugger plug
|
||||
set DCCSI_PY_DEFAULT=%DCCSI_PY_BASE%
|
||||
echo DCCSI_PY_DEFAULT = %DCCSI_PY_DEFAULT%
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
echo.
|
||||
|
||||
REM "C:\Program Files\Microsoft VS Code\Code.exe"
|
||||
|
||||
IF EXIST "%ProgramFiles%\Microsoft VS Code\Code.exe" (
|
||||
start "" "%ProgramFiles%\Microsoft VS Code\Code.exe" "%VSCODE_WRKSPC%"
|
||||
) ELSE (
|
||||
Where Code.exe 2> NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo Code.exe could not be found
|
||||
pause
|
||||
) ELSE (
|
||||
start "" code.exe "%VSCODE_WRKSPC%"
|
||||
)
|
||||
)
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
@echo off
|
||||
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Launches Wing IDE and the DccScriptingInterface Project Files
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCCsi Launch WingIDE 7x
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
:: Constant Vars (Global)
|
||||
:: global debug (propogates)
|
||||
IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True)
|
||||
echo DCCSI_GDEBUG = %DCCSI_GDEBUG%
|
||||
:: initiates debugger connection
|
||||
IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True)
|
||||
echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE%
|
||||
:: sets debugger, options: WING, PYCHARM
|
||||
IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING)
|
||||
echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER%
|
||||
:: Default level logger will handle
|
||||
:: CRITICAL:50
|
||||
:: ERROR:40
|
||||
:: WARNING:30
|
||||
:: INFO:20
|
||||
:: DEBUG:10
|
||||
:: NOTSET:0
|
||||
IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10)
|
||||
echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL%
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Qt.bat
|
||||
CALL %~dp0\Env_Maya.bat
|
||||
CALL %~dp0\Env_Substance.bat
|
||||
CALL %~dp0\Env_WingIDE.bat
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ WingIDE Version %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR%
|
||||
echo ~ Launching O3DE %O3DE_PROJECT% project in WingIDE %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR% ...
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo O3DE_DEV = %O3DE_DEV%
|
||||
|
||||
:: shared location for default O3DE python location
|
||||
set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python
|
||||
echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL%
|
||||
|
||||
echo.
|
||||
|
||||
:: Change to root dir
|
||||
CD /D %O3DE_PROJECT_PATH%
|
||||
|
||||
IF EXIST "%WINGHOME%\bin\wing.exe" (
|
||||
start "" "%WINGHOME%\bin\wing.exe" "%WING_PROJ%"
|
||||
) ELSE (
|
||||
Where wing.exe 2> NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo wing.exe could not be found
|
||||
pause
|
||||
) ELSE (
|
||||
start "" wing.exe "%WING_PROJ%"
|
||||
)
|
||||
)
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCCsi Launch MayaPy
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
:: Store current directory and change to environment directory so script works in any path.
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: Default Maya and Python version
|
||||
set MAYA_VERSION=2020
|
||||
set DCCSI_PY_VERSION_MAJOR=2
|
||||
set DCCSI_PY_VERSION_MINOR=7
|
||||
set DCCSI_PY_VERSION_RELEASE=11
|
||||
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Maya.bat
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
:: ide and debugger plug
|
||||
set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA%
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ Launching O3DE DCCsi MayaPy (%MAYA_VERSION%) ...
|
||||
echo ________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo MAYA_VERSION = %MAYA_VERSION%
|
||||
echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR%
|
||||
echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR%
|
||||
echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE%
|
||||
echo MAYA_LOCATION = %MAYA_LOCATION%
|
||||
echo MAYA_BIN_PATH = %MAYA_BIN_PATH%
|
||||
|
||||
:: Change to root dir
|
||||
CD /D %O3DE_PROJECT_PATH%
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
:: Default to the right version of Maya if we can detect it... and launch
|
||||
IF EXIST "%DCCSI_PY_MAYA%" (
|
||||
start "" "%DCCSI_PY_MAYA%" %*
|
||||
) ELSE (
|
||||
Where maya.exe 2> NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo Maya.exe could not be found
|
||||
pause
|
||||
) ELSE (
|
||||
start "" Maya.exe %*
|
||||
)
|
||||
)
|
||||
|
||||
ENDLOCAL
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
@echo off
|
||||
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Launches Wing IDE and the DccScriptingInterface Project Files
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCCsi Launch WingIDE 7x
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: Constant Vars (Global)
|
||||
:: global debug (propogates)
|
||||
IF "%DCCSI_GDEBUG%"=="" (set DCCSI_GDEBUG=True)
|
||||
echo DCCSI_GDEBUG = %DCCSI_GDEBUG%
|
||||
:: initiates debugger connection
|
||||
IF "%DCCSI_DEV_MODE%"=="" (set DCCSI_DEV_MODE=True)
|
||||
echo DCCSI_DEV_MODE = %DCCSI_DEV_MODE%
|
||||
:: sets debugger, options: WING, PYCHARM
|
||||
IF "%DCCSI_GDEBUGGER%"=="" (set DCCSI_GDEBUGGER=WING)
|
||||
echo DCCSI_GDEBUGGER = %DCCSI_GDEBUGGER%
|
||||
:: Default level logger will handle
|
||||
:: CRITICAL:50
|
||||
:: ERROR:40
|
||||
:: WARNING:30
|
||||
:: INFO:20
|
||||
:: DEBUG:10
|
||||
:: NOTSET:0
|
||||
IF "%DCCSI_LOGLEVEL%"=="" (set DCCSI_LOGLEVEL=10)
|
||||
echo DCCSI_LOGLEVEL = %DCCSI_LOGLEVEL%
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_WingIDE.bat
|
||||
CALL %~dp0\Env_Maya.bat
|
||||
|
||||
echo.
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
echo ~ WingIDE Version %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR%
|
||||
echo ~ Launching O3DE %O3DE_PROJECT% project in WingIDE %DCCSI_WING_VERSION_MAJOR%.%DCCSI_WING_VERSION_MINOR% ...
|
||||
echo ~ MayaPy.exe (default python interpreter)
|
||||
echo _____________________________________________________________________
|
||||
echo.
|
||||
|
||||
echo O3DE_DEV = %O3DE_DEV%
|
||||
|
||||
:: shared location for default O3DE python location
|
||||
set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python
|
||||
echo O3DE_PYTHON_INSTALL = %O3DE_PYTHON_INSTALL%
|
||||
|
||||
:: Wing and other IDEs probably prefer access directly to the python.exe
|
||||
set DCCSI_PY_IDE = %O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python
|
||||
echo DCCSI_PY_IDE = %DCCSI_PY_IDE%
|
||||
|
||||
:: ide and debugger plug
|
||||
set DCCSI_PY_BASE=%DCCSI_PY_IDE%\python.exe
|
||||
echo DCCSI_PY_BASE = %DCCSI_PY_BASE%
|
||||
|
||||
:: ide and debugger plug
|
||||
set DCCSI_PY_DEFAULT=%DCCSI_PY_MAYA%
|
||||
echo DCCSI_PY_DEFAULT = %DCCSI_PY_DEFAULT%
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
echo.
|
||||
|
||||
:: Change to root dir
|
||||
CD /D %O3DE_PROJECT_PATH%
|
||||
|
||||
IF EXIST "%WINGHOME%\bin\wing.exe" (
|
||||
start "" "%WINGHOME%\bin\wing.exe" "%WING_PROJ%"
|
||||
) ELSE (
|
||||
Where wing.exe 2> NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo wing.exe could not be found
|
||||
pause
|
||||
) ELSE (
|
||||
start "" wing.exe "%WING_PROJ%"
|
||||
)
|
||||
)
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Set up and run LY Python CMD prompt
|
||||
:: Sets up the DccScriptingInterface_Env,
|
||||
:: Puts you in the CMD within the dev environment
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCCsi Launch pyBase
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Qt.bat
|
||||
CALL %~dp0\Env_Maya.bat
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
echo Starting: %DCCSI_PY_BASE%
|
||||
|
||||
call %DCCSI_PY_BASE% %*
|
||||
|
||||
ENDLOCAL
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
@echo off
|
||||
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Set up and run LY Python CMD prompt
|
||||
:: Sets up the DccScriptingInterface_Env,
|
||||
:: Puts you in the CMD within the dev environment
|
||||
|
||||
:: Set up window
|
||||
TITLE O3DE DCCsi pyBase CMD
|
||||
:: Use obvious color to prevent confusion (Grey with Yellow Text)
|
||||
COLOR 8E
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
:: Initialize env
|
||||
CALL %~dp0\Env_Core.bat
|
||||
CALL %~dp0\Env_Python.bat
|
||||
CALL %~dp0\Env_Qt.bat
|
||||
CALL %~dp0\Env_Maya.bat
|
||||
|
||||
:: if the user has set up a custom env call it
|
||||
IF EXIST "%~dp0Env_Dev.bat" CALL %~dp0Env_Dev.bat
|
||||
|
||||
:: Change to root dir
|
||||
CD /D %O3DE_PROJECT_PATH%
|
||||
|
||||
:: Create command prompt with environment
|
||||
CALL %windir%\system32\cmd.exe
|
||||
|
||||
ENDLOCAL
|
||||
|
||||
:: Return to starting directory
|
||||
POPD
|
||||
|
||||
:END_OF_FILE
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
"""
|
||||
Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
"""
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
DccScriptingInterface (DCCsi) is a framework for O3DE extensions, for example:
|
||||
- Lightweight python integrations with DCC tools like Maya
|
||||
- O3DE configuration, customization and extensions of tools
|
||||
- Standalone PySide2/Qt tools
|
||||
- ^ These might utilize a mix of O3DE and DDC python APIs
|
||||
|
||||
The DccScriptingInterface\config.py, procedurally provides a synthetic env context.
|
||||
This env is a data-driven approach to configuring layered and managed env settings.
|
||||
|
||||
This env provides the hooks for DDC apps and/or standalone tools,
|
||||
to configure acess to O3DE code (for boostrapping), safely retreive known paths, set/get developer flags, etc.
|
||||
|
||||
DccScriptingInterface\Tools\Dev\Windows\
|
||||
|
||||
This is a .bat file based version of the default env context for development on windows.
|
||||
This is what we use to boot the default env context such that it is available, when launching a development tool such as a IDE.
|
||||
|
||||
This allows a developer to troubleshoot/debug code, like config.py
|
||||
|
||||
Other tools, can use config.py to stand up the env context.
|
||||
|
||||
What is in this folder ...
|
||||
|
||||
Core env modules
|
||||
---------------------
|
||||
Env_Core.bat : core access to O3DE and DCCsi
|
||||
Env_Python.bat : access to O3DE python and general py configuration
|
||||
Env_Qt.bat : access to O3DE Qt .dll files and PySide2
|
||||
|
||||
DCC add on envars
|
||||
---------------------
|
||||
Env_Maya.bat : configures Maya with code O3DE/DCCsi access
|
||||
Env_Substance.bat : Configures Substance Designer
|
||||
|
||||
IDE env
|
||||
---------------------
|
||||
Env_WingIDE.bat : configures WingIDE for DCCsi development
|
||||
Env_VScode.bat : configures VScode for DCCsi development
|
||||
Env_PyCharm.bat : configures PyCharm for DCCsi development
|
||||
|
||||
Launchers
|
||||
---------------------
|
||||
Launch_env_Cmd.bat : Starts a cmd with entire managed env context
|
||||
: ^ allows use to validate env
|
||||
: ^ display all default ENVAR plugs
|
||||
: ^ allows user to test O3DE python + scripts from cmd
|
||||
Launch_PyMin_Cmd.bat : Starts minimal cmd with O3DE python access only
|
||||
: ^ for instance, test Dccsi\config.py like this:
|
||||
: {DCCsi prommpt}>python config.py
|
||||
Launch_Maya_2020.bat : Starts Maya2020 within managed env context
|
||||
Launch_WindIDE-7-1.bat : Starts WingIDE within managed env context
|
||||
|
||||
---------------------
|
||||
Instructions: How to test the synthetic environment and settings externally
|
||||
|
||||
1. Run the cmd: Launch_PyMin_Cmd.bat
|
||||
|
||||
C:\Depot\o3de-engine\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface>
|
||||
|
||||
2. Run command:>python config.py -dm=True -py=True -qt=True
|
||||
|
||||
What this does?
|
||||
- runs the O3DE python exe
|
||||
- starts the config.py which begins to procedurally create synthetic/dynamic environment (hooks)
|
||||
- ^ this starts with DCCsi hooks
|
||||
- enters 'dev mode'(-dm) and attempts to attach debugger (Wing IDE only for now, others planned)
|
||||
- enables additional O3DE python hooks and code access
|
||||
- ^ great for standalone tools, but you don't want that functionality to interfer with other DCC tools python environments (like Maya!)
|
||||
- enables access to O3DE Qt .dlls and PySide2 python package support(-qt)
|
||||
- ^ great for standalone PySide2 which can operate outside of the O3DE editor
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
@echo off
|
||||
REM
|
||||
REM Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
REM
|
||||
REM SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
REM
|
||||
REM
|
||||
|
||||
:: Store current dir
|
||||
%~d0
|
||||
cd %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
:: This maps up to the \Dev folder
|
||||
set O3DE_DEV=..\..\..\..\..\..
|
||||
|
||||
:: shared location for default O3DE python location
|
||||
set O3DE_PYTHON_INSTALL=%O3DE_DEV%\Python
|
||||
|
||||
set PY_SITE=%O3DE_PYTHON_INSTALL%\runtime\python-3.7.10-rev2-windows\python\Lib\site-packages
|
||||
|
||||
set PACKAGE_LOC=C:\Depot\3rdParty\packages\openimageio-2.1.16.0-rev1-windows\OpenImageIO\2.1.16.0\win_x64\bin
|
||||
|
||||
copy %PACKAGE_LOC%\OpenImageIO.pyd %PY_SITE%\OpenImageIO.pyd
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
We .gitignore the folder .dev:
|
||||
DccScriptingInterface\Solutions\.dev
|
||||
|
||||
Locally we put two things here foor development.
|
||||
|
||||
1. pyi inspection files, this makes it easier to add a single folder
|
||||
to IDE configurations for api inspection and auto-complete
|
||||
|
||||
DccScriptingInterface\Solutions\.dev\pyi
|
||||
DccScriptingInterface\Solutions\.dev\pyi\maya
|
||||
DccScriptingInterface\Solutions\.dev\pyi\pymel
|
||||
DccScriptingInterface\Solutions\.dev\pyi\PySide2
|
||||
etc
|
||||
|
||||
2. Pyside2-tools
|
||||
|
||||
DccScriptingInterface\Solutions\.dev\QtForPython\pyside2-tools-dev
|
||||
|
||||
These are not currently part of the O3DE QtForPython Gem
|
||||
But they can be valuable for development.
|
||||
|
||||
Ticket to include them in O3DE: https://jira.agscollab.com/browse/ATOM-13861
|
||||
|
||||
You can manually clone them from here: https://github.com/pyside/pyside2-tools
|
||||
|
||||
Note: if you want to use them as a python package
|
||||
1. you will need to add as a site-package (PYTHONPATH)
|
||||
2. you will need to rename a file:
|
||||
this: pyside2-tools/pyside2uic/__init__.py.in
|
||||
becomes: pyside2-tools/pyside2uic/__init__.py
|
||||
|
||||
Some examples are in: DccScriptingInterface\azpy\shared\ui\templates.py
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
.dev/*
|
||||
!.dev/stub
|
||||
!.dev/readme.txt
|
||||
!.idea
|
||||
!.vscode
|
||||
!.wing
|
||||
.venv
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
# Default ignored files
|
||||
./workspace.xml
|
||||
+1
@@ -0,0 +1 @@
|
||||
workspace.xml
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/..">
|
||||
<sourceFolder url="file://$MODULE_DIR$/../SDK/Python/Lib/3.x/3.7.x/site-packages" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../azpy" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../.idea" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../3rdParty" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../Code" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../Editor" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../Launchers" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../MockProject" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/../SDK" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$" type="java-resource" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.7 (Solutions) (2)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PyNamespacePackagesService">
|
||||
<option name="namespacePackageFolders">
|
||||
<list>
|
||||
<option value="$MODULE_DIR$/../azpy" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</module>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
||||
Generated
+27
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# !/usr/bin/python
|
||||
#
|
||||
# Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# This is a sample Python script.
|
||||
|
||||
# Press Shift+F10 to execute it or replace it with your code.
|
||||
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
|
||||
|
||||
|
||||
def print_hi(name):
|
||||
# Use a breakpoint in the code line below to debug your script.
|
||||
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
|
||||
|
||||
|
||||
# Press the green button in the gutter to run the script.
|
||||
if __name__ == '__main__':
|
||||
print_hi('PyCharm')
|
||||
|
||||
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
|
||||
Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/Tools/Dev/Windows/Solutions/.idea/misc.xml
Generated
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (Solutions) (2)" project-jdk-type="Python SDK" />
|
||||
<component name="PyPackaging">
|
||||
<option name="earlyReleasesAsUpgrades" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/DccScriptingInterface.iml" filepath="$PROJECT_DIR$/.idea/DccScriptingInterface.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WebResourcesPaths">
|
||||
<contentEntries>
|
||||
<entry url="file://$PROJECT_DIR$/..">
|
||||
<entryData>
|
||||
<resourceRoots>
|
||||
<path value="file://$PROJECT_DIR$/../azpy/shared/ui/resources" />
|
||||
</resourceRoots>
|
||||
</entryData>
|
||||
</entry>
|
||||
</contentEntries>
|
||||
</component>
|
||||
</project>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "..\\.."
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"python.envFile": "${workspaceFolder}/../../.env",
|
||||
"python.pythonPath": "${env:DCCSI_PY_DEFAULT}"
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python: Current File",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"console": "integratedTerminal",
|
||||
"python": "${workspaceFolder}\\..\\..\\..\\..\\..\\..\\Tools\\Python\\3.7.5\\windows\\python.exe"
|
||||
}
|
||||
]
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"python.envFile": "${workspaceFolder}/../../.env",
|
||||
"python.pythonPath": "${workspaceFolder}\\..\\..\\..\\..\\..\\..\\Tools\\Python\\3.7.5\\windows\\python.exe",
|
||||
"editor.wordWrap": "wordWrapColumn"
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
*.wpu
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
#!wing
|
||||
#!version=7.0
|
||||
##################################################################
|
||||
# Wing project file #
|
||||
##################################################################
|
||||
[project attributes]
|
||||
debug.launch-configs = (2,
|
||||
{'launch-0L6se5pxC9AWvpY0': ({'shared': True},
|
||||
{'buildcmd': ('project',
|
||||
None),
|
||||
'env': ('project',
|
||||
[u'']),
|
||||
'name': 'DCCSI_PY_IDE',
|
||||
'pyexec': ('custom',
|
||||
u'${DCCSI_PY_IDE}'),
|
||||
'pypath': ('project',
|
||||
[]),
|
||||
'pyrunargs': ('project',
|
||||
'-u'),
|
||||
'runargs': u'',
|
||||
'rundir': ('project',
|
||||
u'')}),
|
||||
'launch-GeaM41WYMGA1sEfm': ({'shared': True},
|
||||
{'buildcmd': ('project',
|
||||
None),
|
||||
'env': ('custom',
|
||||
[u'']),
|
||||
'name': u'DCCSI_PY_MAYA',
|
||||
'pyexec': ('custom',
|
||||
u'${DCCSI_PY_MAYA}'),
|
||||
'pypath': ('project',
|
||||
[]),
|
||||
'pyrunargs': ('project',
|
||||
'-u'),
|
||||
'runargs': u'',
|
||||
'rundir': ('project',
|
||||
u'')}),
|
||||
'launch-WUN9lgYK6qYU7qE9': ({'shared': True},
|
||||
{'buildcmd': ('project',
|
||||
None),
|
||||
'env': ('custom',
|
||||
[u'']),
|
||||
'name': u'DCCSI_PY_BASE',
|
||||
'pyexec': ('custom',
|
||||
u'${DCCSI_PY_BASE}'),
|
||||
'pypath': ('project',
|
||||
[]),
|
||||
'pyrunargs': ('project',
|
||||
'-u'),
|
||||
'runargs': u'',
|
||||
'rundir': ('project',
|
||||
u'')})})
|
||||
proj.directory-list = [{'dirloc': loc('../../../../..'),
|
||||
'excludes': (),
|
||||
'filter': u'*',
|
||||
'include_hidden': False,
|
||||
'recursive': True,
|
||||
'watch_for_changes': True},
|
||||
{'dirloc': loc('../../../../../../../../Atom/Feature/Common/Editor/Scripts/ColorGrading'),
|
||||
'excludes': (),
|
||||
'filter': u'*',
|
||||
'include_hidden': False,
|
||||
'recursive': True,
|
||||
'watch_for_changes': True},
|
||||
{'dirloc': loc('../../../../../../../../../python'),
|
||||
'excludes': (),
|
||||
'filter': u'*',
|
||||
'include_hidden': False,
|
||||
'recursive': True,
|
||||
'watch_for_changes': True}]
|
||||
proj.file-type = 'shared'
|
||||
proj.launch-config = {loc('../../../../../azpy/core/py2/utils.py'): ('custom',
|
||||
(u'',
|
||||
'launch-0L6se5pxC9AWvpY0')),
|
||||
loc('../../../../../azpy/core/py3/utils.py'): ('custom',
|
||||
(u'',
|
||||
'launch-0L6se5pxC9AWvpY0'))}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
We .gitignore the folder .dev:
|
||||
DccScriptingInterface\Solutions\.dev
|
||||
|
||||
The user can create this folder locally.
|
||||
We use it to store .pyi files to add to IDE configurations
|
||||
for api inspection and auto-complete functionality
|
||||
Reference in New Issue
Block a user