Hey @ruyman! Welcome to the forums =)
The before_app_launch
hook on tk-multi-launchapp
is still the way to go, but you should only need to maintain one copy of the customized hook.
The idea is that you make a single copy of before_app_launch
, make your modifications there, then in your configuration, just point to that customized hook wherever it’s relevant – and that can be across environments and/or engines (Toolkit engines correspond to DCCs – Maya, Nuke, etc.).
Additionally, Toolkit configurations support the concept of includes, so you can set that value in one place in your config, and then just include it into the different environments/engines. This might be the way to go for minimal configuration maintenance.
This is the configuration block for tk-multi-launchapp
in our Default Config that’s included into various environments/engines:
# 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"
location: "@apps.tk-multi-launchapp.location"
So, in a simple example, you’d store your modified copy of the hook at config/env/hooks/before_app_launch.py
. Then, you’d just add the following line to the above block:
hook_before_app_launch: "{config}/tk-multi-launchapp/before_app_launch.py"
Of course, there may be other places where you need to make the change (not all instances of tk-multi-launchapp
in your config necessarily include from this block), so it’s important to be mindful of that.
A couple side notes:
-
The Software Entity: While you can have individual
tk-multi-launchapp
instances for each piece of software you want to provide a launcher for, you can also use Software entities in Shotgun to manage your software, then use a single instance of tk-multi-launchapp
, with the use_software_entity
configuration setting set to True
'. You’ll still need to configure the app per-engine and environment (eg, in the project
environment, I want to make tk-multi-launchapp
available in the tk-desktop
engine), but within each engine/environment, you’ll only have one instance, rather than one for Maya, one for Nuke, one for Photoshop, etc. More on the Software entity here.
- You have a lot of different storage options for your customized hook.
{config
is just one of them. More about that here
Hopefully that clears things up. Let me know if you still have questions.