added maya

This commit is contained in:
iLLiCiTiT 2020-11-24 20:02:18 +01:00
parent cb07c41d92
commit 9940ff2fa9

View file

@ -0,0 +1,17 @@
import os
from pype.lib import PreLaunchHook
class MayaLaunchArguments(PreLaunchHook):
"""Add path to last workfile to launch arguments."""
order = 0
hosts = ["maya"]
def execute(self):
"""Prepare suprocess launch arguments for NukeX."""
if self.data.get("start_last_workfile"):
last_workfile = self.data.get("last_workfile_path")
if os.path.exists(last_workfile):
self.launch_context.launch_args.append(
"\"{}\"".format(last_workfile)
)