ensure startup.py will by always added to environment

This commit is contained in:
Jakub Jezek 2023-06-26 15:37:22 +02:00
parent baf88f1358
commit 14e7a914ce
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -16,6 +16,8 @@ class ResolveLaunchLastWorkfile(PreLaunchHook):
app_groups = ["resolve"]
def execute(self):
self.set_startup_script()
if not self.data.get("start_last_workfile"):
self.log.info("It is set to not start last workfile on start.")
return
@ -35,6 +37,7 @@ class ResolveLaunchLastWorkfile(PreLaunchHook):
key = "OPENPYPE_RESOLVE_OPEN_ON_LAUNCH"
self.launch_context.env[key] = last_workfile
def set_startup_script(self):
# Set the openpype prelaunch startup script path for easy access
# in the LUA .scriptlib code
op_resolve_root = os.path.dirname(openpype.hosts.resolve.__file__)