App_launch.py

Hello community members,

can you tell me how to know the app_launch.py is called?

import os
import tank

class AppLaunch(tank.Hook):
“”"
Hook to run an application.
“”"

def execute(
    self, app_path, app_args, version, engine_name, software_entity=None, **kwargs
):

os.chdir("..")

unfortunately it doesn’t work. I’m quite new and don’t know how can I solve this problem.

Thanks
Phuoc

2 Likes

Hi @Phuoc :wave:, welcome to the community! I added your post to the pipeline category which will give it some more visibility.

2 Likes

Hi @Phuoc!

I believe you’re talking about the app_launch hook in the tk-multi-launchapp Toolkit app? Hooks are bits of python code in our apps, separated from the main logic of the app so that they can be easily customized. The tk-multi-launchapp app runs any time a DCC (eg, Maya, Nuke, etc.) is launched in a Toolkit-aware way – either from the Shotgun Desktop tool, from the right-click menus on entities in Shotgun, from the command line, or in custom scripts. The app_launch hook is the part of the app’s logic that actually runs the command to launch the DCC – it allows you to customize the launch command, for example, you can use different flags.

Are you trying to customize the app launch process? Can you tell us a little more about what you’re trying to achieve?

2 Likes