added few basic prelaunch hooks for nuke

This commit is contained in:
iLLiCiTiT 2020-11-24 18:18:39 +01:00
parent 88316fe421
commit b1c587ae83
3 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,18 @@
from pype.lib import PreLaunchHook
class HieroLaunchArguments(PreLaunchHook):
order = 0
def execute(self):
"""Prepare suprocess launch arguments for NukeX."""
# Get executable
executable = self.launch_context.launch_args[0]
if isinstance(executable, str):
executable = [executable]
# Add `nukex` argument and make sure it's bind to execuable
executable.append("--hiero")
self.launch_context.launch_args[0] = executable

View file

@ -0,0 +1,18 @@
from pype.lib import PreLaunchHook
class NukeStudioLaunchArguments(PreLaunchHook):
order = 0
def execute(self):
"""Prepare suprocess launch arguments for NukeX."""
# Get executable
executable = self.launch_context.launch_args[0]
if isinstance(executable, str):
executable = [executable]
# Add `nukex` argument and make sure it's bind to execuable
executable.append("--studio")
self.launch_context.launch_args[0] = executable

View file

@ -0,0 +1,18 @@
from pype.lib import PreLaunchHook
class NukeXLaunchArguments(PreLaunchHook):
order = 0
def execute(self):
"""Prepare suprocess launch arguments for NukeX."""
# Get executable
executable = self.launch_context.launch_args[0]
if isinstance(executable, str):
executable = [executable]
# Add `nukex` argument and make sure it's bind to execuable
executable.append("--nukex")
self.launch_context.launch_args[0] = executable