use relative path to MAX_HOST_DIR constant (#5382)

This commit is contained in:
Jakub Trllo 2023-08-03 10:24:00 +02:00 committed by GitHub
parent 7e9f42b447
commit 20376655fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
"""Pre-launch to force 3ds max startup script."""
import os
from openpype.hosts.max import MAX_HOST_DIR
from openpype.lib.applications import PreLaunchHook, LaunchTypes
@ -21,5 +22,6 @@ class ForceStartupScript(PreLaunchHook):
startup_args = [
"-U",
"MAXScript",
f"{os.getenv('OPENPYPE_ROOT')}\\openpype\\hosts\\max\\startup\\startup.ms"] # noqa
os.path.join(MAX_HOST_DIR, "startup", "startup.ms"),
]
self.launch_context.launch_args.append(startup_args)