Deadline Scripting Reference  9.0.12.0
Deadline.Plugins.DeadlinePlugin Class Reference

The abstract render plugin class, which is subclassed in the plugin python script file. More...

Inherits FranticX.Processes.ManagedProcess.

Public Member Functions

void CancelTask ()
 Sets a flag to cancel the current task if possible. More...
 
string CheckForMonitoredManagedProcessPopups (string name)
 Checks if the managed process has displayed any popups. If an unhandled popup is detected, an error message will be returned. Otherwise, this returns an empty string. More...
 
void ClearProcessEnvironmentVariables ()
 Clears the extra environment variables for the plugin. More...
 
int[] CpuAffinity ()
 Gets the Slave's CPU affinity if OverrideCpuAffinity is True. More...
 
void CreateCommandFile (string filename, string command)
 Creates a text file with the given command in it. This is useful when running programs that use file-based communication. More...
 
string CreateTempDirectory (string prefix)
 Creates a temporary directory using the specified prefix. This directory is created in the local Slave's job folder. It will be cleaned up automatically when the Slave starts a new job. More...
 
void DebugMessage (string message)
 Logs a DEBUG message. DEBUG messages are only visible if "DebugLogging=true" is set in the plugin's param file. More...
 
void DetachMonitoredManagedProcess (string name)
 Detaches from a managed process. If the render finishes, the process will be left running. More...
 
void DetachMonitoredProgram (string name)
 Detaches from a monitored process. If the render finishes, the process will be left running. More...
 
void ExitWithSuccess ()
 This will cause the render to finish immediately, and the task will be completed. More...
 
void FailRender (string message)
 Fails the render. This will requeue the task and create an error report. This is the same as calling AbortRender(). More...
 
void FlushMonitoredManagedProcessStdout (string name)
 Flushes the stdout for the managed process. This should be called occassionally so that the process' stdout is logged, and for stdout handling to work. More...
 
void FlushMonitoredManagedProcessStdoutNoHandling (string name)
 Flushes the stdout for the managed process. This works the same as FlushMonitoredManagedProcessStdout, except that no stdout handling is performed on the stdout that is flushed. More...
 
string[] GetAuxiliaryFilenames ()
 Gets the list of auxiliary files that were submitted with the job. More...
 
bool GetBooleanConfigEntry (string key)
 Gets a value as a bool from the plugin's configuration for the given key. More...
 
bool GetBooleanConfigEntryWithDefault (string key, bool defaultValue)
 Gets a value as a bool from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned. More...
 
bool GetBooleanPluginInfoEntry (string key)
 Gets the job's plugin info value as a bool for the given key. More...
 
bool GetBooleanPluginInfoEntryWithDefault (string key, bool defaultValue)
 Gets the job's plugin info value as a bool for the given key. If the key doesn't exist, the default value is returned. More...
 
string GetConfigEntry (string key)
 Gets a value from the plugin's configuration for the given key. More...
 
string GetConfigEntryWithDefault (string key, string defaultValue)
 Gets a value from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned. More...
 
Task GetCurrentTask ()
 Gets the current Task that is being rendered. More...
 
string GetCurrentTaskId ()
 Gets the ID of the task that is being rendered. More...
 
string GetDataFilename ()
 Gets the first auxiliary file that was submitted with the job. More...
 
int GetEndFrame ()
 Gets the last frame for the current task. If task only contains one frame, or if this plugin only supports single frames, this will be the same frame returned by GetStartFrame(). More...
 
float GetFloatConfigEntry (string key)
 Gets a value as a float from the plugin's configuration for the given key. More...
 
float GetFloatConfigEntryWithDefault (string key, float defaultValue)
 Gets a value as a float from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned. More...
 
float GetFloatPluginInfoEntry (string key)
 Gets the job's plugin info value as a float for the given key. More...
 
float GetFloatPluginInfoEntryWithDefault (string key, float defaultValue)
 Gets the job's plugin info value as a float for the given key. If the key doesn't exist, the default value is returned. More...
 
int GetIntegerConfigEntry (string key)
 Gets a value as an integer from the plugin's configuration for the given key. More...
 
int GetIntegerConfigEntryWithDefault (string key, int defaultValue)
 Gets a value as an integer from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned. More...
 
int GetIntegerPluginInfoEntry (string key)
 Gets the job's plugin info value as an integer for the given key. More...
 
int GetIntegerPluginInfoEntryWithDefault (string key, int defaultValue)
 Gets the job's plugin info value as an integer for the given key. If the key doesn't exist, the default value is returned. More...
 
Job GetJob ()
 Gets the job that is being rendered. More...
 
string GetJobInfoEntry (string propertyName)
 Gets the value of the Job Property with the given name. More...
 
string GetJobInfoEntryElement (string propertyName, int arrayPosition)
 Returns the element at a specific position in a Job Property (the property specified must be an Array). More...
 
int GetJobInfoEntryElementCount (string propertyName)
 Gets the number of elements in a Job Property (the property specified must be an Array). More...
 
string GetJobsDataDirectory ()
 Gets the Slave's local job directory where the job's auxiliary files are copied before rendering. More...
 
long GetLongConfigEntry (string key)
 Gets a value as a long from the plugin's configuration for the given key. More...
 
long GetLongConfigEntryWithDefault (string key, long defaultValue)
 Gets a value as a long from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned. More...
 
long GetLongPluginInfoEntry (string key)
 Gets the job's plugin info value as a long for the given key. More...
 
long GetLongPluginInfoEntryWithDefault (string key, long defaultValue)
 Gets the job's plugin info value as a long for the given key. If the key doesn't exist, the default value is returned. More...
 
uint[] GetManagedProcessIDs ()
 Gets the process ids for the managed processes for this plugin. More...
 
int GetMonitoredManagedProcessExitCode (string name)
 Gets the exit code of a managed process. More...
 
uint[] GetMonitoredManagedProcessIDs (string name)
 Gets the process IDs for the managed process and all of its child processes. More...
 
string GetPluginDirectory ()
 Gets the Slave's local plugin directory where the job's plugin is copied before rendering. More...
 
string GetPluginInfoEntry (string key)
 Gets the job's plugin info value for the given key. More...
 
string GetPluginInfoEntryWithDefault (string key, string defaultValue)
 Gets the job's plugin info value for the given key. If the key doesn't exist, the default value is returned. More...
 
string GetProcessEnvironmentVariable (string key)
 Gets the extra environment variable for the plugin with the given key. If the variable is not defined, an empty string is returned. More...
 
string GetSlaveDirectory ()
 Gets the Slave's local directory where it stores the job's plugin and auxiliary files. More...
 
string GetSlaveName ()
 Gets the name of the Slave that is rendering this task. More...
 
int GetStartFrame ()
 Gets the first frame for the current task. More...
 
int GetThreadNumber ()
 Gets the ID of the Slave's render thread that is rendering this task. More...
 
int[] GpuAffinity ()
 Gets the Slave's GPU affinity if OverrideGpuAffinity is True. More...
 
bool IsCanceled ()
 Checks if the render has been cancelled. This should be used by advanced plugins to determine if the render has been canceled, and then perform any necessary cleanup. For simple plugins, cancelled renders are handled automatically. More...
 
bool IsMaintenanceJob ()
 Gets if the current job is a maintenance job. More...
 
bool IsRunningAsService ()
 Gets if the Slave is running as a service (Windows only). More...
 
bool IsTileJob ()
 Gets if the current job is a tile job. More...
 
void LogInfo (string message)
 Logs an INFO message. More...
 
void LogStdout (string message)
 Logs a STDOUT message. More...
 
void LogWarning (string message)
 Logs a WARNING message. More...
 
bool MonitoredManagedProcessIsRunning (string name)
 Checks if a managed process is still running. More...
 
bool MonitoredProgramIsRunning (string name)
 Checks if a monitored program is still running. More...
 
bool OverrideCpuAffinity ()
 Gets if the Slave is overriding its CPU affinity. More...
 
bool OverrideGpuAffinity ()
 Gets if the Slave is overriding its GPU affinity. More...
 
bool ProcessEnvironmentVariableExists (string key)
 Checks if the extra environment with the given key exists. More...
 
void RedirectStdOutToFileForMonitoredManagedProcess (string name, string filename)
 Redirect stdout for this managed process to the specified file. More...
 
void RunManagedProcess (ManagedProcess managedProcess)
 Runs the given ManagedProcess object. The managing of this process will be handled automatically. This function blocks until the process has finished. More...
 
void RunManagedProcessAsUser (ManagedProcess managedProcess, string userName, string domain, string password, bool useSu, bool preserveEnvironment, bool setHomeVariable)
 Runs the given ManagedProcess object as the given user. The managing of this process will be handled automatically. This function blocks until the process has finished. More...
 
int RunProcess (string executable, string arguments, string startupDirectory, int timeoutMilliseconds)
 Runs a process and waits for it to complete. More...
 
int RunProcessAsUser (string executable, string arguments, string startupDirectory, int timeoutMilliseconds, string userName, string domain, string password)
 Runs a process as the given user and waits for it to complete. More...
 
int RunProcessAsUser (string executable, string arguments, string startupDirectory, int timeoutMilliseconds, string userName, string domain, string password, bool useSu, bool preserveEnvironment, bool setHomeVariable)
 Runs a process as the given user and waits for it to complete. More...
 
void SetMonitoredManagedProcessExitCheckingFlag (string name, bool flag)
 By default, if a managed process exits unexpectedly, an error whill be thrown. If this flag is set to False, no error will be thrown if the process exits. More...
 
void SetMonitoredProgramExitCheckingFlag (string name, bool flag)
 By default, if a monitored program exits unexpectedly, an error whill be thrown. If this flag is set to False, no error will be thrown if the program exits. More...
 
void SetProcessEnvironmentVariable (string key, string value)
 Sets extra environment variables for any processes started by this plugin. The processes must be started using RunManagedProcess(), StartMonitoredProgram(), StartMonitoredManagedProcess(), or RunProcess(). This will take precedence over a variable in the current environment with the same name. More...
 
void SetProgress (double percent)
 Sets the Slave's current progress. More...
 
void SetStatusMessage (string status)
 Sets the Slave's status message. More...
 
void ShutdownMonitoredManagedProcess (string name)
 Stops the managed process. More...
 
void ShutdownMonitoredProgram (string name)
 Stops the monitored process. More...
 
void StartMonitoredManagedProcess (string name, ManagedProcess managedProcess)
 Runs the given ManagedProcess object. The managing of this process must be handled manually. This function will return as soon as the process has started. More...
 
void StartMonitoredManagedProcessAsUser (string name, ManagedProcess managedProcess, string userName, string domain, string password, bool useSu, bool preserveEnvironment, bool setHomeVariable)
 Runs the given ManagedProcess object as the given user. The managing of this process must be handled manually. This function will return as soon as the process has started. More...
 
void StartMonitoredProgram (string name, string executable, string arguments, string startupDirectory)
 Runs a monitored process. The process is monitored while it is running to determine if it exits unexpectedly, and it will be stopped automatically when the task is finished. More...
 
void StartMonitoredProgramAsUser (string name, string executable, string arguments, string startupDirectory, string userName, string domain, string password, bool useSu, bool preserveEnvironment, bool setHomeVariable)
 Runs a monitored process as the given user. The process is monitored while it is running to determine if it exits unexpectedly, and it will be stopped automatically when the task is finished. More...
 
void VerifyAndMoveDirectory (string source, string destination, bool failIfEmpty, int fileSize)
 Moves the files from the source directory to the destination directory. It can verify that the source directory isn't empty and throw an error if it is. More...
 
void VerifyAndMoveFile (string source, string destination, int fileSize)
 Moves the given file to the destination. It can verify that the file is above a certain size and throw an error if it is not. More...
 
void VerifyFile (string filename, int fileSize)
 Checks that the file is larger than the given size, and throws an error if it is not. More...
 
void VerifyMonitoredManagedProcess (string name)
 Automatically throws an error if the managed process is no longer running. More...
 
void VerifyMonitoredProgram (string name)
 Automatically throws an error if the monitored program is no longer running. More...
 
string WaitForCommandFile (string filename, bool delete, int timeoutMilliseconds)
 Waits until a text file with the given name exists. The contents of the file are then returned. More...
 
bool WaitForMonitoredManagedProcessToExit (string name, int timeoutMilliseconds)
 Blocks until a managed process exits, or the timeout is reached. More...
 
bool WaitForMonitoredProgramToExit (string name, int timeoutMilliseconds)
 Blocks until a monitored program exits, or the timeout is reached. More...
 
void WriteStdinToMonitoredManagedProcess (string name, string stdin)
 Writes input to the managed process' stding pipe. More...
 
- Public Member Functions inherited from FranticX.Processes.ManagedProcess
void AbortRender (string message)
 Aborts the render with a Major abort level. More...
 
void AbortRender (string message, AbortLevel level)
 Aborts the render with the given abort level. More...
 
void AddExitCodeToIgnore (int exitCode)
 Adds an exit code that should be ignored. More...
 
void AddPopupHandler (string regexTitle, string buttons)
 Adds a popup handler to press one or more buttons when a matching popup is detected. More...
 
void AddPopupHandler (string regexTitle, string regexContent, string buttons)
 Adds a popup handler to press one or more buttons when a matching popup is detected. More...
 
void AddPopupIgnorer (string regexTitle)
 Adds a popup ignorer. If a matching popup is detected, it is ignored. This should not be used on popups that block the rendering process (AddPopupHandler should be used in this case). More...
 
void AddPopupIgnorer (string regexTitle, string regexContent)
 Adds a popup ignorer. If a matching popup is detected, it is ignored. This should not be used on popups that block the rendering process (AddPopupHandler should be used in this case). More...
 
RegexHandlerCallback AddStdoutHandlerCallback (string regexString)
 Adds a stdout handler that can be used to handle a matching line of stdout. A RegexHandlerCallback object is returned, and a callback can be assigned to this object's HandleCallback property to handle a matching line of stdout. More...
 
RegexHandlerCallback AddStdoutHandlerEvent (string regexString)
 DEPRECATED: Use AddStdoutHandlerCallback. More...
 
void ClearEnvironmentVariables ()
 Clears the extra environment variables for the rendering process. More...
 
bool EnvironmentVariableExists (string key)
 Checks if the environment with the given key exists. More...
 
string GetEnvironmentVariable (string key)
 Gets the extra environment variable for the rendering process with the given key. If the variable is not defined, an empty string is returned. More...
 
string GetPreviousStdoutLine ()
 Gets the previous line of stdout. This should be called from a callback for a stdout handler to get the line before the current one. More...
 
string GetRegexMatch (int index)
 Gets the matched text at the given index for the current regular expression. This should be called from a callback for a stdout handler to get a match from the current line being handled. More...
 
 ManagedProcess ()
 Constructor. More...
 
void RedirectStdoutToFile (string filename)
 Redirect stdout for this render to the specified file. This should be called from the callback to initialize the process to ensure that all stdout goes to the file. More...
 
void ResetProcessAffinity ()
 Resets the affinity settings for the process. More...
 
void SetEnvironmentVariable (string key, string value)
 Sets extra environment variables for the rendering process only. This will take precedence over a variable in the current environment with the same name. More...
 
void SetUpdateTimeout (int timeout)
 Sets the update timeout. A timeout error will occur if the process goes the specified number of seconds without any stdout being printed out. More...
 
void SuppressThisLine ()
 Suppresses the next line of stdout. This should be called from a callback for a stdout handler to suppress the current line being handled. More...
 

Properties

PluginType PluginType [get, set]
 Gets or sets the plugin type. Simple plugins just need to define the render execuable, arguments, etc, that are needed to run the process. The managing of the process is handled automatically. Advanced plugins provide a lot more control, but the managing of any rendering processes must be done manually. More...
 
bool SingleFramesOnly [get, set]
 Gets or sets if the plugin can only render one frame at a time. More...
 
bool UseProcessEnvironmentVariablesOnly [get, set]
 If True, only the extra environment variables defined for the plugin will be used. If False (the default behavior), the extra environment variables will be merged with the current environment. More...
 
- Properties inherited from FranticX.Processes.ManagedProcess
bool AsynchronousStdout [get, set]
 Gets or sets if stdout redirection is asynchronous. This is ignored if StdoutRedirection is disabled. This is also ignored on Windows. More...
 
bool CreateNewConsole [get, set]
 Gets or sets if a new console should be created. More...
 
bool DebugLogging [get, set]
 Gets or sets if debug logging is enabled. More...
 
string Domain [get, set]
 The domain when running the process as a different user. This is ignored on Linux and Mac OSX. More...
 
bool FatalPythonErrors [get, set]
 Gets or sets if python errors should be treated as fatal errors. More...
 
bool HandleQtPopups [get, set]
 Gets or sets whether or not the process should handle Qt popups More...
 
bool HandleWindows10Popups [get, set]
 Gets or sets whether or not the process should handle Windows10 popups More...
 
bool HideDosWindow [get, set]
 Gets or sets of the Dos window should be hidden. More...
 
bool ImmediateTermination [get, set]
 Gets or sets if the process should terminate immediately instead of being allowed to shutdown gracefully. More...
 
int MaxHandledLineSize [get, set]
 Gets or sets the maximum line size that will be handled by the stdout handlers. Set to 0 to disable stdout handling. More...
 
string Password [get, set]
 The password when running the process as a different user. This is ignored on Linux and Mac OSX. More...
 
string[] PopupButtonClasses [get, set]
 Gets or sets the list of class names that the popup handlers considers to be buttons. More...
 
bool PopupHandling [get, set]
 Gets or sets if popup handling is enabled. More...
 
int PopupMaxChildWindows [get, set]
 Gets or sets the maximum number of controls that can be in a popup window. If a popup has more then this, it will not be considered a popup and will be ignored. More...
 
string[] PopupTextClasses [get, set]
 Gets or sets the list of class names that the popup handlers considers to be text fields. More...
 
bool PreserveEnvironment [get, set]
 If true, the environment will be preserved when running the process as another user using 'su' or 'sudo'. This is ignored on Windows. More...
 
bool PressEnterDuringRender [get, set]
 Gets or sets if the Enter button should be pressed shortly after starting the process. This can be useful if the process requires a key press to exit after it finishes running. More...
 
int[] ProcessAffinity [get, set]
 Gets or sets the affinity for the process (Windows and Linux only). If set to an empty list, the default affinity will be used. More...
 
ProcessPriorityClass ProcessPriority [get, set]
 Gets or sets the process priority class. This should typically be set to ProcessPriorityClass.BelowNormal so that the machine is still interactive during a heavy render. More...
 
bool RunAsUser [get, set]
 If true, the process will run as the user specified in UserName. More...
 
bool RunAsUserWithSu [get, set]
 If true, 'su' will be used to run the process as another user instead of 'sudo'. This is ignored on Windows. More...
 
bool SetHomeVariable [get, set]
 If true, the HOME environment variable will be set to the users home directory when running sudo. Not compatible with su. This is ignored on Windows. More...
 
bool SimulateLogin [get, set]
 If true, 'su' will simulate a login by the user we are running as. More...
 
string StdOutEncoding [get, set]
 Used to specify the name of the Character Encoding that will be used to decode StdOut and StdErr. More...
 
bool StdoutHandling [get, set]
 Gets or sets if stdout handling is enabled. This is ignored if StdoutRedirection is disabled. More...
 
bool StdoutRedirection [get, set]
 Gets or sets if stdout redirection is enabled. More...
 
bool TerminateOnExit [get, set]
 Gets or sets of the process should be terminated on exit. More...
 
bool UseExtraEnvironmentVariablesOnly [get, set]
 If True, only the rendering process' extra environment variables will be used. If False (the default behavior), the extra environment variables will be merged with the current environment. More...
 
bool UseProcessTree [get, set]
 If True, further sub-processes started by this ManagedProcess will be tracked and terminated along with it. On Windows, this utilizes Job Objects. Defaults to True. More...
 
string UserName [get, set]
 The user to run as. Only works if RunAsUser is enabled. More...
 

Events

GenericDelegate0 EndJobCallback
 This is for Advanced plugins only. If a function is assigned to this callback, it will be called when the Slave finishes up the job. More...
 
GenericDelegate0< bool > IsSingleFramesOnlyCallback
 If a function is assigned to this callback, it will return whether or not the plugin can render only one frame at a time. More...
 
GenericDelegate1< string > MonitoredManagedProcessExitCallback
 If a function is assigned to this callback, it will be called when a ManagedProcess exits unexpectedly. More...
 
GenericDelegate1< string > MonitoredProgramExitCallback
 If a function is assigned to this callback, it will be called when a managed program exits unexpectedly. More...
 
GenericDelegate0 RenderTasksCallback
 This is for Advanced plugins only. A function must be assigned to this callback, and it will be called to handle the processing for each task the Slave renders. More...
 
GenericDelegate0 StartJobCallback
 This is for Advanced plugins only. If a function is assigned to this callback, it will be called when the job is first started on the Slave. More...
 
- Events inherited from FranticX.Processes.ManagedProcess
GenericDelegate1< int > CheckExitCodeCallback
 If a function is assigned to this callback, it will be called after the executable has finished running, and can be used to check the exit code. If no function is assigned, the default behavior will be to fail if the executable returns a non-zero exit code. More...
 
GenericDelegate0 InitializeProcessCallback
 If a function is assigned to this callback, it will be called to initialize the process. More...
 
GenericDelegate3< string[], string, string, string > ModifyCommandLineCallback
 If a function is assigned to this callback, it will be called immediately before the executable is run, and can be used to modify the executable command. The function must return a tuple of three strings denoting the executable path, the command arguments, and the startup directory. More...
 
GenericDelegate0 PostRenderTasksCallback
 If a function is assigned to this callback, it will be called after the executable has finished running. More...
 
GenericDelegate0 PreRenderTasksCallback
 If a function is assigned to this callback, it will be called prior to running the executable. More...
 
GenericDelegate0< string > RenderArgumentCallback
 If a function is assigned to this callback, it will be called to return the arguments to be passed to the executable. More...
 
GenericDelegate0 RenderCanceledCallback
 If a function is assigned to this callback, it will be called when the render is canceled. It can be used to perform some cleanup operations. More...
 
GenericDelegate0< string > RenderExecutableCallback
 A function must be assigned to this callback. It should return the executable to be run. If the executable isn't rooted, the current directory will be checked first, followed by all directories in the PATH environment variable. More...
 
GenericDelegate0< string > StartupDirectoryCallback
 If a function is assigned to this callback, it will be called to return the directory that the exectuable should run. More...
 
GenericDelegate0 TimeoutTasksCallback
 If a function is assigned to this callback, it will be called if update timeouts are enabled, and that timeout has passed. More...
 

Additional Inherited Members

- Public Types inherited from FranticX.Processes.ManagedProcess
enum  AbortLevel { AbortLevel.Minor, AbortLevel.Major, AbortLevel.Fatal, AbortLevel.Success }
 The different levels when aborting a render. More...
 
- Static Public Member Functions inherited from FranticX.Processes.ManagedProcess
static bool DetectLoop (MethodBase info)
 

Detailed Description

The abstract render plugin class, which is subclassed in the plugin python script file.

Member Function Documentation

void Deadline.Plugins.DeadlinePlugin.CancelTask ( )

Sets a flag to cancel the current task if possible.

string Deadline.Plugins.DeadlinePlugin.CheckForMonitoredManagedProcessPopups ( string  name)

Checks if the managed process has displayed any popups. If an unhandled popup is detected, an error message will be returned. Otherwise, this returns an empty string.

Parameters
nameThe unique name to identify the process.
Returns
An error message if an unhandled popup was detected. If no popup was detected, an empty string is returned.
void Deadline.Plugins.DeadlinePlugin.ClearProcessEnvironmentVariables ( )

Clears the extra environment variables for the plugin.

int [] Deadline.Plugins.DeadlinePlugin.CpuAffinity ( )

Gets the Slave's CPU affinity if OverrideCpuAffinity is True.

Returns
The list of CPU ids.
void Deadline.Plugins.DeadlinePlugin.CreateCommandFile ( string  filename,
string  command 
)

Creates a text file with the given command in it. This is useful when running programs that use file-based communication.

Parameters
filenameThe name of the file. If it exists, it will be overwritten.
commandThe command to write to the file.
string Deadline.Plugins.DeadlinePlugin.CreateTempDirectory ( string  prefix)

Creates a temporary directory using the specified prefix. This directory is created in the local Slave's job folder. It will be cleaned up automatically when the Slave starts a new job.

Parameters
prefixThe prefix for the temp directory.
Returns
void Deadline.Plugins.DeadlinePlugin.DebugMessage ( string  message)

Logs a DEBUG message. DEBUG messages are only visible if "DebugLogging=true" is set in the plugin's param file.

Parameters
messageThe message.
void Deadline.Plugins.DeadlinePlugin.DetachMonitoredManagedProcess ( string  name)

Detaches from a managed process. If the render finishes, the process will be left running.

Parameters
nameThe unique name to identify the process.
void Deadline.Plugins.DeadlinePlugin.DetachMonitoredProgram ( string  name)

Detaches from a monitored process. If the render finishes, the process will be left running.

Parameters
nameThe unique name to identify the process.
void Deadline.Plugins.DeadlinePlugin.ExitWithSuccess ( )

This will cause the render to finish immediately, and the task will be completed.

void Deadline.Plugins.DeadlinePlugin.FailRender ( string  message)

Fails the render. This will requeue the task and create an error report. This is the same as calling AbortRender().

Parameters
messageThe message that will appear in the error report.
void Deadline.Plugins.DeadlinePlugin.FlushMonitoredManagedProcessStdout ( string  name)

Flushes the stdout for the managed process. This should be called occassionally so that the process' stdout is logged, and for stdout handling to work.

Parameters
nameThe unique name to identify the process.
void Deadline.Plugins.DeadlinePlugin.FlushMonitoredManagedProcessStdoutNoHandling ( string  name)

Flushes the stdout for the managed process. This works the same as FlushMonitoredManagedProcessStdout, except that no stdout handling is performed on the stdout that is flushed.

Parameters
nameThe unique name to identify the process.
string [] Deadline.Plugins.DeadlinePlugin.GetAuxiliaryFilenames ( )

Gets the list of auxiliary files that were submitted with the job.

Returns
The list of auxiliary files.
bool Deadline.Plugins.DeadlinePlugin.GetBooleanConfigEntry ( string  key)

Gets a value as a bool from the plugin's configuration for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
bool Deadline.Plugins.DeadlinePlugin.GetBooleanConfigEntryWithDefault ( string  key,
bool  defaultValue 
)

Gets a value as a bool from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
bool Deadline.Plugins.DeadlinePlugin.GetBooleanPluginInfoEntry ( string  key)

Gets the job's plugin info value as a bool for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
bool Deadline.Plugins.DeadlinePlugin.GetBooleanPluginInfoEntryWithDefault ( string  key,
bool  defaultValue 
)

Gets the job's plugin info value as a bool for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
string Deadline.Plugins.DeadlinePlugin.GetConfigEntry ( string  key)

Gets a value from the plugin's configuration for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
string Deadline.Plugins.DeadlinePlugin.GetConfigEntryWithDefault ( string  key,
string  defaultValue 
)

Gets a value from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
Task Deadline.Plugins.DeadlinePlugin.GetCurrentTask ( )

Gets the current Task that is being rendered.

Returns
string Deadline.Plugins.DeadlinePlugin.GetCurrentTaskId ( )

Gets the ID of the task that is being rendered.

Returns
The task ID, as a string.
string Deadline.Plugins.DeadlinePlugin.GetDataFilename ( )

Gets the first auxiliary file that was submitted with the job.

Returns
The name of the auxiliary file. If there are no auxiliary files, an empty string is returned.
int Deadline.Plugins.DeadlinePlugin.GetEndFrame ( )

Gets the last frame for the current task. If task only contains one frame, or if this plugin only supports single frames, this will be the same frame returned by GetStartFrame().

Returns
The last frame.
float Deadline.Plugins.DeadlinePlugin.GetFloatConfigEntry ( string  key)

Gets a value as a float from the plugin's configuration for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
float Deadline.Plugins.DeadlinePlugin.GetFloatConfigEntryWithDefault ( string  key,
float  defaultValue 
)

Gets a value as a float from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
float Deadline.Plugins.DeadlinePlugin.GetFloatPluginInfoEntry ( string  key)

Gets the job's plugin info value as a float for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
float Deadline.Plugins.DeadlinePlugin.GetFloatPluginInfoEntryWithDefault ( string  key,
float  defaultValue 
)

Gets the job's plugin info value as a float for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
int Deadline.Plugins.DeadlinePlugin.GetIntegerConfigEntry ( string  key)

Gets a value as an integer from the plugin's configuration for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
int Deadline.Plugins.DeadlinePlugin.GetIntegerConfigEntryWithDefault ( string  key,
int  defaultValue 
)

Gets a value as an integer from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
int Deadline.Plugins.DeadlinePlugin.GetIntegerPluginInfoEntry ( string  key)

Gets the job's plugin info value as an integer for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
int Deadline.Plugins.DeadlinePlugin.GetIntegerPluginInfoEntryWithDefault ( string  key,
int  defaultValue 
)

Gets the job's plugin info value as an integer for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
Job Deadline.Plugins.DeadlinePlugin.GetJob ( )

Gets the job that is being rendered.

Returns
The job object.
string Deadline.Plugins.DeadlinePlugin.GetJobInfoEntry ( string  propertyName)

Gets the value of the Job Property with the given name.

Parameters
propertyNameThe name of the Job property to get.
Returns
The Job property's value.
string Deadline.Plugins.DeadlinePlugin.GetJobInfoEntryElement ( string  propertyName,
int  arrayPosition 
)

Returns the element at a specific position in a Job Property (the property specified must be an Array).

Parameters
propertyNameThe name of the Job property from which to obtain the element.
arrayPositionThe position of the element to query.
Returns
The element at the specified position within the Job's array property.
int Deadline.Plugins.DeadlinePlugin.GetJobInfoEntryElementCount ( string  propertyName)

Gets the number of elements in a Job Property (the property specified must be an Array).

Parameters
propertyNameThe name of the Job property to count.
Returns
The number of elements in the array property.
string Deadline.Plugins.DeadlinePlugin.GetJobsDataDirectory ( )

Gets the Slave's local job directory where the job's auxiliary files are copied before rendering.

Returns
The local job directory path.
long Deadline.Plugins.DeadlinePlugin.GetLongConfigEntry ( string  key)

Gets a value as a long from the plugin's configuration for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
long Deadline.Plugins.DeadlinePlugin.GetLongConfigEntryWithDefault ( string  key,
long  defaultValue 
)

Gets a value as a long from the plugin's configuration for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
long Deadline.Plugins.DeadlinePlugin.GetLongPluginInfoEntry ( string  key)

Gets the job's plugin info value as a long for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
long Deadline.Plugins.DeadlinePlugin.GetLongPluginInfoEntryWithDefault ( string  key,
long  defaultValue 
)

Gets the job's plugin info value as a long for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
uint [] Deadline.Plugins.DeadlinePlugin.GetManagedProcessIDs ( )

Gets the process ids for the managed processes for this plugin.

Returns
int Deadline.Plugins.DeadlinePlugin.GetMonitoredManagedProcessExitCode ( string  name)

Gets the exit code of a managed process.

Parameters
nameThe unique name to identify the process.
Returns
The exit code.
uint [] Deadline.Plugins.DeadlinePlugin.GetMonitoredManagedProcessIDs ( string  name)

Gets the process IDs for the managed process and all of its child processes.

Parameters
nameThe unique name to identify the process.
Returns
The list of process IDs.
string Deadline.Plugins.DeadlinePlugin.GetPluginDirectory ( )

Gets the Slave's local plugin directory where the job's plugin is copied before rendering.

Returns
The local plugin directory path.
string Deadline.Plugins.DeadlinePlugin.GetPluginInfoEntry ( string  key)

Gets the job's plugin info value for the given key.

Parameters
keyThe name of the plugin info entry. An error is thrown if the key is not defined.
Returns
The value.
string Deadline.Plugins.DeadlinePlugin.GetPluginInfoEntryWithDefault ( string  key,
string  defaultValue 
)

Gets the job's plugin info value for the given key. If the key doesn't exist, the default value is returned.

Parameters
keyThe name of the plugin info entry.
defaultValueThe default value.
Returns
The value. If the given key does not exist, the default value is returned.
string Deadline.Plugins.DeadlinePlugin.GetProcessEnvironmentVariable ( string  key)

Gets the extra environment variable for the plugin with the given key. If the variable is not defined, an empty string is returned.

Parameters
keyThe name of the environment variable.
Returns
The value, or an empty string if the variable is not defined.
string Deadline.Plugins.DeadlinePlugin.GetSlaveDirectory ( )

Gets the Slave's local directory where it stores the job's plugin and auxiliary files.

Returns
The local Slave directory path.
string Deadline.Plugins.DeadlinePlugin.GetSlaveName ( )

Gets the name of the Slave that is rendering this task.

Returns
The Slave name.
int Deadline.Plugins.DeadlinePlugin.GetStartFrame ( )

Gets the first frame for the current task.

Returns
The first frame.
int Deadline.Plugins.DeadlinePlugin.GetThreadNumber ( )

Gets the ID of the Slave's render thread that is rendering this task.

Returns
The thread ID as an integer.
int [] Deadline.Plugins.DeadlinePlugin.GpuAffinity ( )

Gets the Slave's GPU affinity if OverrideGpuAffinity is True.

Returns
The list of GPU ids.
bool Deadline.Plugins.DeadlinePlugin.IsCanceled ( )

Checks if the render has been cancelled. This should be used by advanced plugins to determine if the render has been canceled, and then perform any necessary cleanup. For simple plugins, cancelled renders are handled automatically.

Returns
bool Deadline.Plugins.DeadlinePlugin.IsMaintenanceJob ( )

Gets if the current job is a maintenance job.

Returns
True if the job is a maintence job.
bool Deadline.Plugins.DeadlinePlugin.IsRunningAsService ( )

Gets if the Slave is running as a service (Windows only).

Returns
True if the Slave is running as a service. False is always returned on Linux and OSX.
bool Deadline.Plugins.DeadlinePlugin.IsTileJob ( )

Gets if the current job is a tile job.

Returns
True if the job is a tile job.
void Deadline.Plugins.DeadlinePlugin.LogInfo ( string  message)

Logs an INFO message.

Parameters
messageThe message.
void Deadline.Plugins.DeadlinePlugin.LogStdout ( string  message)

Logs a STDOUT message.

Parameters
messageThe message.
void Deadline.Plugins.DeadlinePlugin.LogWarning ( string  message)

Logs a WARNING message.

Parameters
messageThe message.
bool Deadline.Plugins.DeadlinePlugin.MonitoredManagedProcessIsRunning ( string  name)

Checks if a managed process is still running.

Parameters
nameThe unique name to identify the process.
Returns
True if the process is running.
bool Deadline.Plugins.DeadlinePlugin.MonitoredProgramIsRunning ( string  name)

Checks if a monitored program is still running.

Parameters
nameThe unique name to identify the process.
Returns
True if the program is running.
bool Deadline.Plugins.DeadlinePlugin.OverrideCpuAffinity ( )

Gets if the Slave is overriding its CPU affinity.

Returns
True if the Slave is overriding its CPU affinity.
bool Deadline.Plugins.DeadlinePlugin.OverrideGpuAffinity ( )

Gets if the Slave is overriding its GPU affinity.

Returns
True if the Slave is overriding its GPU affinity.
bool Deadline.Plugins.DeadlinePlugin.ProcessEnvironmentVariableExists ( string  key)

Checks if the extra environment with the given key exists.

Parameters
keyThe name of the environment variable.
Returns
True if the variable exists, otherwise False.
void Deadline.Plugins.DeadlinePlugin.RedirectStdOutToFileForMonitoredManagedProcess ( string  name,
string  filename 
)

Redirect stdout for this managed process to the specified file.

Parameters
nameThe unique name to identify the process.
filenameThe name of the file. If the file already exists, it will be overwritten.
void Deadline.Plugins.DeadlinePlugin.RunManagedProcess ( ManagedProcess  managedProcess)

Runs the given ManagedProcess object. The managing of this process will be handled automatically. This function blocks until the process has finished.

Parameters
managedProcessThe ManagedProcess object.
void Deadline.Plugins.DeadlinePlugin.RunManagedProcessAsUser ( ManagedProcess  managedProcess,
string  userName,
string  domain,
string  password,
bool  useSu,
bool  preserveEnvironment,
bool  setHomeVariable 
)

Runs the given ManagedProcess object as the given user. The managing of this process will be handled automatically. This function blocks until the process has finished.

Parameters
managedProcessThe ManagedProcess object.
userNameThe name of the user to run the process as. This is required for Windows, Linux, and Mac OS X.
domainThe user's domain name, which is used to run the process as the given user. This is only required on Windows.
passwordThe user's password, which is used to run the process as the given user. This is only required on Windows.
useSuIf true, 'su' will be used to run the process as another user instead of 'sudo' (if runAsUser is enabled). This is ignored on Windows.
preserveEnvironmentIf true, the environment will be preserved when running the process as another user using 'su' or 'sudo' (if runAsUser is enabled). This is ignored on Windows.
setHomeVariableIf true, the HOME environment variable will be set to the users home directory when running sudo. Not compatible with su. This is ignored on Windows.
int Deadline.Plugins.DeadlinePlugin.RunProcess ( string  executable,
string  arguments,
string  startupDirectory,
int  timeoutMilliseconds 
)

Runs a process and waits for it to complete.

Parameters
executableThe executable to run. If the executable isn't rooted, the current directory will be checked first, followed by all directories in the PATH environment variable.
argumentsThe arguments to pass to the executable.
startupDirectoryThe directory to start the exectuable in. Specify an empty string to use directory the executable is in.
timeoutMillisecondsThe number of milliseconds for the process to exit, otherwise an error is thrown. If this is less than 0, this will block until the process exits.
Returns
The exit code of the process.
int Deadline.Plugins.DeadlinePlugin.RunProcessAsUser ( string  executable,
string  arguments,
string  startupDirectory,
int  timeoutMilliseconds,
string  userName,
string  domain,
string  password 
)

Runs a process as the given user and waits for it to complete.

Parameters
executableThe executable to run. If the executable isn't rooted, the current directory will be checked first, followed by all directories in the PATH environment variable.
argumentsThe arguments to pass to the executable.
startupDirectoryThe directory to start the exectuable in. Specify an empty string to use directory the executable is in.
timeoutMillisecondsThe number of milliseconds for the process to exit, otherwise an error is thrown. If this is less than 0, this will block until the process exits.
userNameThe name of the user to run the process as. This is required for Windows, Linux, and Mac OS X.
domainThe user's domain name, which is used to run the process as the given user. This is only required on Windows.
passwordThe user's password, which is used to run the process as the given user. This is only required on Windows.
Returns
The exit code of the process.
int Deadline.Plugins.DeadlinePlugin.RunProcessAsUser ( string  executable,
string  arguments,
string  startupDirectory,
int  timeoutMilliseconds,
string  userName,
string  domain,
string  password,
bool  useSu,
bool  preserveEnvironment,
bool  setHomeVariable 
)

Runs a process as the given user and waits for it to complete.

Parameters
executableThe executable to run. If the executable isn't rooted, the current directory will be checked first, followed by all directories in the PATH environment variable.
argumentsThe arguments to pass to the executable.
startupDirectoryThe directory to start the exectuable in. Specify an empty string to use directory the executable is in.
timeoutMillisecondsThe number of milliseconds for the process to exit, otherwise an error is thrown. If this is less than 0, this will block until the process exits.
userNameThe name of the user to run the process as. This is required for Windows, Linux, and Mac OS X.
domainThe user's domain name, which is used to run the process as the given user. This is only required on Windows.
passwordThe user's password, which is used to run the process as the given user. This is only required on Windows.
useSuIf true, 'su' will be used to run the process as another user instead of 'sudo' (if runAsUser). This is ignored on Windows.
preserveEnvironmentIf true, the environment will be preserved when running the process as another user using 'su' or 'sudo' (if runAsUser). This is ignored on Windows.
setHomeVariableIf true, a flag will be passed to 'sudo' when running running as another user to inherit the user's home directory. This is ignored on Windows.
Returns
The exit code of the process.
void Deadline.Plugins.DeadlinePlugin.SetMonitoredManagedProcessExitCheckingFlag ( string  name,
bool  flag 
)

By default, if a managed process exits unexpectedly, an error whill be thrown. If this flag is set to False, no error will be thrown if the process exits.

Parameters
nameThe unique name to identify the process.
flagThe flag value.
void Deadline.Plugins.DeadlinePlugin.SetMonitoredProgramExitCheckingFlag ( string  name,
bool  flag 
)

By default, if a monitored program exits unexpectedly, an error whill be thrown. If this flag is set to False, no error will be thrown if the program exits.

Parameters
nameThe unique name to identify the process.
flagThe flag value.
void Deadline.Plugins.DeadlinePlugin.SetProcessEnvironmentVariable ( string  key,
string  value 
)

Sets extra environment variables for any processes started by this plugin. The processes must be started using RunManagedProcess(), StartMonitoredProgram(), StartMonitoredManagedProcess(), or RunProcess(). This will take precedence over a variable in the current environment with the same name.

Parameters
keyThe name of the environment variable.
valueThe value.
void Deadline.Plugins.DeadlinePlugin.SetProgress ( double  percent)

Sets the Slave's current progress.

Parameters
percentA value between 0.0 and 100.0 inclusive.
void Deadline.Plugins.DeadlinePlugin.SetStatusMessage ( string  status)

Sets the Slave's status message.

Parameters
statusThe status message.
void Deadline.Plugins.DeadlinePlugin.ShutdownMonitoredManagedProcess ( string  name)

Stops the managed process.

Parameters
nameThe unique name to identify the process.
void Deadline.Plugins.DeadlinePlugin.ShutdownMonitoredProgram ( string  name)

Stops the monitored process.

Parameters
nameThe unique name to identify the process.
void Deadline.Plugins.DeadlinePlugin.StartMonitoredManagedProcess ( string  name,
ManagedProcess  managedProcess 
)

Runs the given ManagedProcess object. The managing of this process must be handled manually. This function will return as soon as the process has started.

Parameters
nameThe unique name to identify the process. This is necessary if the plugin is running more than one managaed process.
managedProcessThe ManagedProcess object.
void Deadline.Plugins.DeadlinePlugin.StartMonitoredManagedProcessAsUser ( string  name,
ManagedProcess  managedProcess,
string  userName,
string  domain,
string  password,
bool  useSu,
bool  preserveEnvironment,
bool  setHomeVariable 
)

Runs the given ManagedProcess object as the given user. The managing of this process must be handled manually. This function will return as soon as the process has started.

Parameters
nameThe unique name to identify the process. This is necessary if the plugin is running more than one managaed process.
managedProcessThe ManagedProcess object.
userNameThe name of the user to run the process as. This is required for Windows, Linux, and Mac OS X.
domainThe user's domain name, which is used to run the process as the given user. This is only required on Windows.
passwordThe user's password, which is used to run the process as the given user. This is only required on Windows.
useSuIf true, 'su' will be used to run the process as another user instead of 'sudo' (if runAsUser). This is ignored on Windows.
preserveEnvironmentIf true, the environment will be preserved when running the process as another user using 'su' or 'sudo' (if runAsUser). This is ignored on Windows.
setHomeVariableIf true, the HOME environment variable will be set to the users home directory when running sudo. Not compatible with su. This is ignored on Windows.
void Deadline.Plugins.DeadlinePlugin.StartMonitoredProgram ( string  name,
string  executable,
string  arguments,
string  startupDirectory 
)

Runs a monitored process. The process is monitored while it is running to determine if it exits unexpectedly, and it will be stopped automatically when the task is finished.

Parameters
nameA unique name to identify the process. This is necessary if the plugin is running more than one monitored program.
executableThe executable to run. If the executable isn't rooted, the current directory will be checked first, followed by all directories in the PATH environment variable.
argumentsThe arguments to pass to the executable.
startupDirectoryThe directory to start the exectuable in. Specify an empty string to use directory the executable is in.
void Deadline.Plugins.DeadlinePlugin.StartMonitoredProgramAsUser ( string  name,
string  executable,
string  arguments,
string  startupDirectory,
string  userName,
string  domain,
string  password,
bool  useSu,
bool  preserveEnvironment,
bool  setHomeVariable 
)

Runs a monitored process as the given user. The process is monitored while it is running to determine if it exits unexpectedly, and it will be stopped automatically when the task is finished.

Parameters
nameA unique name to identify the process. This is necessary if the plugin is running more than one monitored program.
executableThe executable to run. If the executable isn't rooted, the current directory will be checked first, followed by all directories in the PATH environment variable.
argumentsThe arguments to pass to the executable.
startupDirectoryThe directory to start the exectuable in. Specify an empty string to use directory the executable is in.
userNameThe name of the user to run the process as. This is required for Windows, Linux, and Mac OS X.
domainThe user's domain name, which is used to run the process as the given user. This is only required on Windows.
passwordThe user's password, which is used to run the process as the given user. This is only required on Windows.
useSuIf true, 'su' will be used to run the process as another user instead of 'sudo' (if runAsUser is set). This is ignored on Windows.
preserveEnvironmentIf true, the environment will be preserved when running the process as another user using 'su' or 'sudo' (if runAsUser is set). This is ignored on Windows.
setHomeVariableIf true, the HOME environment variable will be set to the users home directory when running sudo. Not compatible with su. This is ignored on Windows.
void Deadline.Plugins.DeadlinePlugin.VerifyAndMoveDirectory ( string  source,
string  destination,
bool  failIfEmpty,
int  fileSize 
)

Moves the files from the source directory to the destination directory. It can verify that the source directory isn't empty and throw an error if it is.

Parameters
sourceThe source directory.
destinationThe destination directory.
failIfEmptyIf True, an error will be thrown if the source directory is empty, or if there are any files in it below the specified file size.
fileSizeThe minimum file size. If less than 0, the file size isn't checked.
void Deadline.Plugins.DeadlinePlugin.VerifyAndMoveFile ( string  source,
string  destination,
int  fileSize 
)

Moves the given file to the destination. It can verify that the file is above a certain size and throw an error if it is not.

Parameters
sourceThe source file name.
destinationThe destination file name.
fileSizeThe minimum file size. If less than 0, the file size isn't checked.
void Deadline.Plugins.DeadlinePlugin.VerifyFile ( string  filename,
int  fileSize 
)

Checks that the file is larger than the given size, and throws an error if it is not.

Parameters
filenameThe file name.
fileSizeThe minimum file size. If less than 0, the file size isn't checked, in which case this function does nothing.
void Deadline.Plugins.DeadlinePlugin.VerifyMonitoredManagedProcess ( string  name)

Automatically throws an error if the managed process is no longer running.

Parameters
nameThe unique name to identify the process.
void Deadline.Plugins.DeadlinePlugin.VerifyMonitoredProgram ( string  name)

Automatically throws an error if the monitored program is no longer running.

Parameters
nameThe unique name to identify the process.
string Deadline.Plugins.DeadlinePlugin.WaitForCommandFile ( string  filename,
bool  delete,
int  timeoutMilliseconds 
)

Waits until a text file with the given name exists. The contents of the file are then returned.

Parameters
filenameThe name of the file.
deleteIf True, the file will be automatically deleted after the contents have been read in.
timeoutMillisecondsThe number of milliseconds to wait for the file to appear. If the timeout is reached, an empty string is returned. If this is less than 0, this will blcok until the file exists.
Returns
The contents of the text file, or an empty string if the timeout was reached.
bool Deadline.Plugins.DeadlinePlugin.WaitForMonitoredManagedProcessToExit ( string  name,
int  timeoutMilliseconds 
)

Blocks until a managed process exits, or the timeout is reached.

Parameters
nameThe unique name to identify the process.
timeoutMillisecondsThe timeout, in milliseconds. If less than 0, this function will block until the process exits.
Returns
True if the process exited before the timeout.
bool Deadline.Plugins.DeadlinePlugin.WaitForMonitoredProgramToExit ( string  name,
int  timeoutMilliseconds 
)

Blocks until a monitored program exits, or the timeout is reached.

Parameters
nameThe unique name to identify the process.
timeoutMillisecondsThe timeout, in milliseconds. If less than 0, this function will block until the program exits.
Returns
True if the program exited before the timeout.
void Deadline.Plugins.DeadlinePlugin.WriteStdinToMonitoredManagedProcess ( string  name,
string  stdin 
)

Writes input to the managed process' stding pipe.

Parameters
nameThe unique name to identify the process.
stdinThe input to write.

Property Documentation

PluginType Deadline.Plugins.DeadlinePlugin.PluginType
getset

Gets or sets the plugin type. Simple plugins just need to define the render execuable, arguments, etc, that are needed to run the process. The managing of the process is handled automatically. Advanced plugins provide a lot more control, but the managing of any rendering processes must be done manually.

bool Deadline.Plugins.DeadlinePlugin.SingleFramesOnly
getset

Gets or sets if the plugin can only render one frame at a time.

bool Deadline.Plugins.DeadlinePlugin.UseProcessEnvironmentVariablesOnly
getset

If True, only the extra environment variables defined for the plugin will be used. If False (the default behavior), the extra environment variables will be merged with the current environment.

Event Documentation

GenericDelegate0 Deadline.Plugins.DeadlinePlugin.EndJobCallback

This is for Advanced plugins only. If a function is assigned to this callback, it will be called when the Slave finishes up the job.

GenericDelegate0<bool> Deadline.Plugins.DeadlinePlugin.IsSingleFramesOnlyCallback

If a function is assigned to this callback, it will return whether or not the plugin can render only one frame at a time.

GenericDelegate1<string> Deadline.Plugins.DeadlinePlugin.MonitoredManagedProcessExitCallback

If a function is assigned to this callback, it will be called when a ManagedProcess exits unexpectedly.

GenericDelegate1<string> Deadline.Plugins.DeadlinePlugin.MonitoredProgramExitCallback

If a function is assigned to this callback, it will be called when a managed program exits unexpectedly.

GenericDelegate0 Deadline.Plugins.DeadlinePlugin.RenderTasksCallback

This is for Advanced plugins only. A function must be assigned to this callback, and it will be called to handle the processing for each task the Slave renders.

GenericDelegate0 Deadline.Plugins.DeadlinePlugin.StartJobCallback

This is for Advanced plugins only. If a function is assigned to this callback, it will be called when the job is first started on the Slave.