mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
AE - modified pre launch hook to open last workfile
TODO - opening from template, opening AE from frozen dist
This commit is contained in:
parent
1d940f8b8b
commit
9523ab586c
2 changed files with 10 additions and 3 deletions
|
|
@ -20,16 +20,23 @@ class AfterEffectsPrelaunchHook(PreLaunchHook):
|
|||
while self.launch_context.launch_args:
|
||||
remainders.append(self.launch_context.launch_args.pop(0))
|
||||
|
||||
workfile_path = self.data["last_workfile_path"]
|
||||
if not os.path.exists(workfile_path):
|
||||
workfile_path = ""
|
||||
|
||||
new_launch_args = [
|
||||
self.python_executable(),
|
||||
"-c",
|
||||
(
|
||||
"import avalon.aftereffects;"
|
||||
"avalon.aftereffects.launch(\"{}\")"
|
||||
).format(aftereffects_executable.replace("\\", "\\\\"))
|
||||
"avalon.aftereffects.launch(\"{}\", \"{}\")"
|
||||
).format(
|
||||
aftereffects_executable.replace("\\", "\\\\"),
|
||||
workfile_path.replace("\\", "\\\\")
|
||||
)
|
||||
]
|
||||
|
||||
# Append as whole list as these areguments should not be separated
|
||||
# Append as whole list as these arguments should not be separated
|
||||
self.launch_context.launch_args.append(new_launch_args)
|
||||
|
||||
if remainders:
|
||||
|
|
|
|||
BIN
pype/hosts/aftereffects/template.aep
Normal file
BIN
pype/hosts/aftereffects/template.aep
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue