Hi Philip,
Thanks for the reply. I added before_app_launch.py hook to those two blocks in tk-multi-launchapp.ym:
# auto discover DCCs for launch
settings.tk-multi-launchapp:
use_software_entity: true
hook_before_register_command: "{config}/tk-multi-launchapp/before_register_command.py"
hook_before_app_launch: "{config}/before_app_launch.py"
location: "@apps.tk-multi-launchapp.location"
# shotgun
settings.tk-multi-launchapp.shotgun:
use_software_entity: true
skip_engine_instances: ["tk-nukestudio"]
hook_before_register_command: "{config}/tk-multi-launchapp/before_register_command.py"
hook_before_app_launch: "{config}/before_app_launch.py"
location: "@apps.tk-multi-launchapp.location":
But I get a KeyError for ‘MAYA_MODULE_PATH’:
2019-11-27 12:21:52,282 [ ERROR] [PROXY] Error calling __commands::maya_2018((), {}):
Traceback (most recent call last):
File "X:\sgtk_studio\_projects\sg_advprjsetup\shotgun_configuration_dev\install\app_store\tk-desktop\v2.4.12\python\tk_desktop\desktop_engine_project_implementation.py", line 164, in _trigger_callback
callback(*args, **kwargs)
File "X:\sgtk_studio\_projects\sg_advprjsetup\shotgun_configuration_dev\install\core\python\tank\platform\engine.py", line 1084, in callback_wrapper
return callback(*args, **kwargs)
File "X:\sgtk_studio\_projects\sg_advprjsetup\shotgun_configuration_dev\install\app_store\tk-multi-launchapp\v0.10.3\python\tk_multi_launchapp\base_launcher.py", line 125, in launch_version
*args, **kwargs
File "X:\sgtk_studio\_projects\sg_advprjsetup\shotgun_configuration_dev\install\app_store\tk-multi-launchapp\v0.10.3\python\tk_multi_launchapp\base_launcher.py", line 354, in _launch_callback
file_to_open,
File "X:\sgtk_studio\_projects\sg_advprjsetup\shotgun_configuration_dev\install\app_store\tk-multi-launchapp\v0.10.3\python\tk_multi_launchapp\base_launcher.py", line 185, in _launch_app
engine_name=app_engine,
File "X:\sgtk_studio\_projects\sg_advprjsetup\shotgun_configuration_dev\install\core\python\tank\platform\bundle.py", line 575, in execute_hook
**kwargs
File "X:\sgtk_studio\_projects\sg_advprjsetup\shotgun_configuration_dev\install\core\python\tank\hook.py", line 618, in execute_hook_method
ret_val = hook_method(**kwargs)
File "X:\sgtk_studio\_projects\sg_advprjsetup\shotgun_configuration_dev\config\hooks\before_app_launch.py", line 227, in execute
self.env_paths_sanity_check()
File "X:\sgtk_studio\_projects\sg_advprjsetup\shotgun_configuration_dev\config\hooks\before_app_launch.py", line 260, in env_paths_sanity_check
for item in os.environ[path_item].split(';'):
File "C:\Program Files\Shotgun\Python\lib\os.py", line 425, in __getitem__
return self.data[key.upper()]
KeyError: 'MAYA_MODULE_PATH'
To be clear this is the same before_app_launch.py that works fine on any project before DefCon2.
Looking at SG desktop log, there seems to be no args passed to the execute method:
2019-11-27 12:21:52,071 [ DEBUG] [PROXY] Running before app launch hook...
2019-11-27 12:21:52,073 [ DEBUG] [PROXY] >: Resolved hook expression (associated with setting 'hook_before_app_launch'): '{config}/before_app_launch.py' -> ['X:\\sgtk_studio\\_projects\\sg_advprjsetup\\shotgun_configuration_dev\\install\\app_store\\tk-multi-launchapp\\v0.10.3\\hooks\\before_app_launch.py', 'X:\\sgtk_studio\\_projects\\sg_advprjsetup\\shotgun_configuration_dev\\config\\hooks\\before_app_launch.py']
2019-11-27 12:21:52,101 [ DEBUG] [PROXY] app_path >>
2019-11-27 12:21:52,101 [ DEBUG] [PROXY] app_args >>
2019-11-27 12:21:52,102 [ DEBUG] [PROXY] version >>
2019-11-27 12:21:52,104 [ DEBUG] [PROXY] engine_name >>