From 3fd7649a9f71e6ca02c67036c2a8a50b6f6a0f24 Mon Sep 17 00:00:00 2001 From: Jonny Galloway Date: Thu, 22 Apr 2021 10:20:30 -0500 Subject: [PATCH] config update Was using engineroot.txt as a search slug, that file no longer exists, switched to engine.json --- .../TechnicalArt/DccScriptingInterface/azpy/__init__.py | 5 ++--- .../DccScriptingInterface/azpy/config_utils.py | 9 ++++----- .../TechnicalArt/DccScriptingInterface/azpy/constants.py | 2 +- .../TechnicalArt/DccScriptingInterface/config.py | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/__init__.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/__init__.py index 57b97ad1cb..415b879ece 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/__init__.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/__init__.py @@ -36,11 +36,10 @@ _TYPE_TAG = 'module' _PACKAGENAME = _TOOL_TAG -__all__ = ['initialize_logger', - 'config_utils', 'render', +__all__ = ['config_utils', 'render', 'constants', 'return_stub', 'synthetic_env', 'env_base', 'env_bool', 'test', 'dev', - 'lumberyard', 'marmoset'] #'blender', 'maya', 'substance', 'houdini'] + 'lumberyard', 'marmoset'] # 'blender', 'maya', 'substance', 'houdini'] # ------------------------------------------------------------------------- diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py index dbc75212d4..9c920a871d 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py @@ -80,9 +80,9 @@ def return_stub_dir(stub_file='dccsi_stub'): # ------------------------------------------------------------------------- -def get_stub_check_path(in_path=os.getcwd(), check_stub='engineroot.txt'): +def get_stub_check_path(in_path=os.getcwd(), check_stub='engine.json'): ''' - Returns the branch root directory of the dev\\'engineroot.txt' + Returns the branch root directory of the dev\\'engine.json' (... or you can pass it another known stub) so we can safely build relative filepaths within that branch. @@ -158,7 +158,6 @@ def bootstrap_dccsi_py_libs(dccsi_dirpath=return_stub_dir()): """Builds and adds local site dir libs based on py version""" from azpy.constants import STR_DCCSI_PYTHON_LIB_PATH # a path string constructor - #_DCCSI_PYTHON_LIB_PATH = "E:\\P4\\jromnoa_spectra_atom_2\\dev\\Tools\\Python\\3.7.5\\windows\\Lib\\site-packages" _DCCSI_PYTHON_LIB_PATH = STR_DCCSI_PYTHON_LIB_PATH.format(dccsi_dirpath, sys.version_info[0], sys.version_info[1]) @@ -193,9 +192,9 @@ if __name__ == '__main__': _config = get_dccsi_config() _LOGGER.info('DCCSI_CONFIG_PATH: {}'.format(_config)) - _LOGGER.info('LY_DEV: {}'.format(get_stub_check_path('engineroot.txt'))) + _LOGGER.info('LY_DEV: {}'.format(get_stub_check_path('engine.json'))) - _LOGGER.info('LY_PROJECT: {}'.format(get_current_project(get_stub_check_path('engineroot.txt')))) + _LOGGER.info('LY_PROJECT: {}'.format(get_current_project(get_stub_check_path('bootstrap.cfg')))) _LOGGER.info('DCCSI_PYTHON_LIB_PATH: {}'.format(bootstrap_dccsi_py_libs(return_stub_dir('dccsi_stub')))) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/constants.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/constants.py index 5ca0bc4a95..792f0faee6 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/constants.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/constants.py @@ -92,7 +92,7 @@ TAG_DIR_LY_BUILD = str('build') TAG_QT_PLUGIN_PATH = str('QT_PLUGIN_PATH') # filesystem markers, stub file names. -STUB_LY_DEV = str('engineroot.txt') +STUB_LY_DEV = str('engine.json') STUB_LY_ROOT_PROJECT = str('ly_project_stub') STUB_LY_ROOT_DCCSI = str('dccsi_stub') STUB_LY_DCCSI_AZPY = str('dccsi_azpy_stub') diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py index 0068b4c766..3757d1dbc8 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/config.py @@ -218,7 +218,7 @@ os.environ["DYNACONF_DCCSI_DEV_MODE"] = str(_DCCSI_DEV_MODE) # search up to get \dev _LY_DEV = azpy.config_utils.get_stub_check_path(in_path=_DCCSIG_PATH, - check_stub='engineroot.txt') + check_stub='engine.json') os.environ["DYNACONF_LY_DEV"] = str(_LY_DEV.resolve()) _LY_PROJECT = azpy.config_utils.get_current_project(_LY_DEV) os.environ["DYNACONF_LY_PROJECT"] = _LY_PROJECT