Bases: PreLaunchHook
Set current dir to workdir.
Hook GlobalHostDataHook
must be executed before this hook.
Source code in client/ayon_max/hooks/set_paths.py
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 | class SetPath(PreLaunchHook):
"""Set current dir to workdir.
Hook `GlobalHostDataHook` must be executed before this hook.
"""
app_groups = {"max"}
launch_types = {LaunchTypes.local}
def execute(self):
workdir = self.launch_context.env.get("AYON_WORKDIR", "")
if not workdir:
self.log.warning("BUG: Workdir is not filled.")
return
self.launch_context.kwargs["cwd"] = workdir
|