mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
OP-1117 - fix for Adobe products
This commit is contained in:
parent
3e64f2d0ce
commit
650294b656
3 changed files with 8 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ class AddLastWorkfileToLaunchArgs(PreLaunchHook):
|
|||
"""Add last workfile path to launch arguments.
|
||||
|
||||
This is not possible to do for all applications the same way.
|
||||
Checks 'start_last_workfile', if set to False, it will not open last
|
||||
wokfile. This property is set explicitly in Launcher.
|
||||
"""
|
||||
|
||||
# Execute after workfile template copy
|
||||
|
|
@ -23,7 +25,7 @@ class AddLastWorkfileToLaunchArgs(PreLaunchHook):
|
|||
]
|
||||
|
||||
def execute(self):
|
||||
if not self.data.get("start_last_workfile"):
|
||||
if not self.data.get("start_last_workfile", True):
|
||||
self.log.info("It is set to not start last workfile on start.")
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class GlobalHostDataHook(PreLaunchHook):
|
|||
|
||||
"env": self.launch_context.env,
|
||||
|
||||
"start_last_workfile": self.data.get("start_last_workfile"),
|
||||
"start_last_workfile": self.data.get("start_last_workfile", True),
|
||||
"last_workfile_path": self.data.get("last_workfile_path"),
|
||||
|
||||
"log": self.log
|
||||
|
|
|
|||
|
|
@ -40,7 +40,10 @@ class NonPythonHostHook(PreLaunchHook):
|
|||
)
|
||||
# Add workfile path if exists
|
||||
workfile_path = self.data["last_workfile_path"]
|
||||
if workfile_path and os.path.exists(workfile_path):
|
||||
if (
|
||||
self.data.get("start_last_workfile", True)
|
||||
and workfile_path
|
||||
and os.path.exists(workfile_path)):
|
||||
new_launch_args.append(workfile_path)
|
||||
|
||||
# Append as whole list as these areguments should not be separated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue