Got a new issue. I’m trying to execute a Photoshop droplet as a command line job. Works perfectly fine everything goes exactly as it should…except when it exits. As far as I can tell in Photoshop scripting when you tell the program to exit…it terminates the program rather than doing a proper exit. Complete guess don’t know what its doing internally. But anyway when a droplet exits normally it returns exit code 1. Problem is obviously deadline interrupts this as a fail and re-queues the task. Is there a way to get it to ignore the exit code 1?
You could modify the CommandLine plugin to ignore exit code 1. I believe \your\repository\plugins\CommandLine\CommandLine.py contains this:
from Deadline.Plugins import *
from Deadline.Scripting import *
######################################################################
## This is the function that Deadline calls to get an instance of the
## main DeadlinePlugin class.
######################################################################
def GetDeadlinePlugin():
return CommandLinePlugin()
######################################################################
## This is the main DeadlinePlugin class for the CommandLine plugin.
######################################################################
class CommandLinePlugin(DeadlinePlugin):
def InitializeProcess(self):
# Set the plugin specific settings.
self.SingleFramesOnly = False
# Set the process specific settings.
self.StdoutHandling = True
self.PopupHandling = True
def RenderExecutable(self):
return GetPluginInfoEntry( "Executable" ).strip()
def RenderArgument(self):
arguments = GetPluginInfoEntry( "Arguments" ).strip()
arguments = arguments.replace( "<STARTFRAME>", str(GetStartFrame()) )
arguments = arguments.replace( "<ENDFRAME>", str(GetEndFrame()) )
arguments = arguments.replace( "<QUOTE>", "\"" )
return arguments
If you update it to look like this, that should do the trick:
from Deadline.Plugins import *
from Deadline.Scripting import *
######################################################################
## This is the function that Deadline calls to get an instance of the
## main DeadlinePlugin class.
######################################################################
def GetDeadlinePlugin():
return CommandLinePlugin()
######################################################################
## This is the main DeadlinePlugin class for the CommandLine plugin.
######################################################################
class CommandLinePlugin(DeadlinePlugin):
def InitializeProcess(self):
# Set the plugin specific settings.
self.SingleFramesOnly = False
# Set the process specific settings.
self.StdoutHandling = True
self.PopupHandling = True
def RenderExecutable(self):
return GetPluginInfoEntry( "Executable" ).strip()
def RenderArgument(self):
arguments = GetPluginInfoEntry( "Arguments" ).strip()
arguments = arguments.replace( "<STARTFRAME>", str(GetStartFrame()) )
arguments = arguments.replace( "<ENDFRAME>", str(GetEndFrame()) )
arguments = arguments.replace( "<QUOTE>", "\"" )
return arguments
def CheckExitCode( self, exitCode ):
if exitCode != 0 and exitCode != 1:
FailRender( "Renderer returned unexpected error code %d" % exitCode )
This is untested, but I think you get the idea.
Cheers,
- Ryan