mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #945 from pypeclub/3.0/feature/ae_workfile_template
AE - added prelaunch hook for opening last or workfile from template
This commit is contained in:
commit
af80aee424
2 changed files with 10 additions and 3 deletions
|
|
@ -20,16 +20,23 @@ class AfterEffectsPrelaunchHook(PreLaunchHook):
|
||||||
while self.launch_context.launch_args:
|
while self.launch_context.launch_args:
|
||||||
remainders.append(self.launch_context.launch_args.pop(0))
|
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 = [
|
new_launch_args = [
|
||||||
self.python_executable(),
|
self.python_executable(),
|
||||||
"-c",
|
"-c",
|
||||||
(
|
(
|
||||||
"import avalon.aftereffects;"
|
"import avalon.aftereffects;"
|
||||||
"avalon.aftereffects.launch(\"{}\")"
|
"avalon.aftereffects.launch(\"{}\", \"{}\")"
|
||||||
).format(aftereffects_executable.replace("\\", "\\\\"))
|
).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)
|
self.launch_context.launch_args.append(new_launch_args)
|
||||||
|
|
||||||
if remainders:
|
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