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