the before_app_launch hook is located in the tk-multi-launchapp shotgun app,
I have no idea how your shotgun config is setup⌠but generally speaking⌠you will have a shotgun project with the following folders inside cache, config, install⌠if you donât have a central install for all your apps also known as a shared_install which is no longer the default then your current shotgun installed apps will be located inside the âinstallâ folder.
go inside that folder, and double click on âtk-multi-launchappâ, inside there you will see a version folder (the current installed version), inside that folder you will see a âhooksâ folder, go in there and you will see âbefore_app_launchâ DONT EDIT THAT .py FILE!
so⌠thats where its located⌠but now you need to make a lot of decisionsâŚI strongly suggest you start reading:
Administrating Hooks
tk-multi-launchapp
There are several embedded links on that page that also highlight hook editing, and managing your project configs.
The general goal is you will copy that before_launch_app hook into your project â@configRoot/configs/hooks/â under a âtk-multi-launchappâ that will need to be created, then inside â@configRoot/env/includesâ you will see a âapp_launchers_ymlâ inside there you can define the new location for your âbefore_launch_appâ hook for each piece of software you want to set ENV variables for.
If you are using the new config_default2 it looks like these hook locations are set inside â@configRoot/env/includes/settingsâ and then there will be a â.ymlâ called âtk-multi-launchapp.ymlâ
ConfigDefault2
Example from config_default:
app_launchers_yml:
These are what the settings look like by default.
launch_maya:
defer_keyword: ââ
engine: tk-maya
extra: {}
hook_app_launch: default
hook_before_app_launch: default
icon: â{target_engine}/icon_256.pngâ
linux_args: ââ
linux_path: â@maya_linuxâ
location:
version: v0.7.6
type: app_store
name: tk-multi-launchapp
mac_args: ââ
mac_path: â@maya_macâ
menu_name: Launch Maya 2015
versions:
windows_args: ââ
windows_path: â@maya_windowsâ
you want to change
hook_before_app_launch: default
to:
assuming you have put the new before_launch_app.py into â@configRoot/hooks/tk-multi-launchappâ
â{config}/tk-multi-launchapp/before_app_launch.pyâ
Hope this helps⌠Itâs a lot of informationâŚanyone that has more info, feel free to add on :D;
-Ross