Skip to content

class ScriptablePipeline ​

ScriptablePipeline lets users define their own processing, while still using the distribution systems supported by Simplygon.

Properties ​

PropertyDescription
LogOutputObjectThe name of the log output object, which will be added to the Output package on completion. The object name defaults to 'LogOutput'
MainScriptObjectThe name of the main script object, which needs to exist in the Input package. The object name defaults to 'MainScript'
NameThe name of the ScriptablePipeline object. (Inherited from Object)
RunModeSets in what context the pipeline will run. Note that 'RunInThisProcess' is not allowed for scriptable pipelines, as users provide their own script environment. Setting this will result in a warning, and a fallback to 'RunInNewProcess'

Methods ​

MethodDescription
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
GetBatchProcessPathGets the current override to the path to the SimplygonBatch processor. If left empty, the Simplygon environment path is instead used to find the batch processor.
GetClassGet the name of the ScriptablePipeline class. (Inherited from Object)
GetInputGet the Input package data object.
GetOutputGet the Output package data object. The object will be filled with valid data after a successful pipeline run.
GetScriptEnvironmentExitCodeRetrieves the exit code from the environment running the script.
IsAReturns true if ScriptablePipeline is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the ScriptablePipeline object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the ScriptablePipeline object is valid. (Inherited from Object)
NonNullReturns true if the ScriptablePipeline object is valid. (Inherited from Object)
PrintInfoPrints the content/info of the ScriptablePipeline object to the log. (Inherited from Object)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)
RunRuns the pipeline. Make sure to set up Input data package and MainScript script file before running. If the returned error is FailedToRunPipeline, the batch process was successfully run, but the script environment returned a non-zero exit code. Use GetScriptEnvironmentExitCode() to retrieve the exit code from the script environment, and the LogOutput object in the Output package to retrieve the stdout and stderr from the script environment.
SetBatchProcessPathOverrides the path to the SimplygonBatch processor. If left empty, the Simplygon environment path is instead used to find the batch processor.

Static methods ​

MethodDescription
IsClassAReturns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCastSafeCast makes sure the input object is of a class that can be cast into spScriptablePipeline, and if this is the case, returns the object cast into spScriptablePipeline. (Inherited from Object)

Properties details ​

LogOutputObject ​

The name of the log output object, which will be added to the Output package on completion. The object name defaults to 'LogOutput'

MainScriptObject ​

The name of the main script object, which needs to exist in the Input package. The object name defaults to 'MainScript'

Name ​

The name of the ScriptablePipeline object. (Inherited from Object)

RunMode ​

Sets in what context the pipeline will run. Note that 'RunInThisProcess' is not allowed for scriptable pipelines, as users provide their own script environment. Setting this will result in a warning, and a fallback to 'RunInNewProcess'

Methods details ​

AddObserver ​

Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)

GetBatchProcessPath ​

Gets the current override to the path to the SimplygonBatch processor. If left empty, the Simplygon environment path is instead used to find the batch processor.

GetClass ​

Get the name of the ScriptablePipeline class. (Inherited from Object)

GetInput ​

Get the Input package data object.

GetOutput ​

Get the Output package data object. The object will be filled with valid data after a successful pipeline run.

GetScriptEnvironmentExitCode ​

Retrieves the exit code from the environment running the script.

IsA ​

Returns true if ScriptablePipeline is a or is a descendant of the class named as the type parameter. (Inherited from Object)

IsNull ​

Returns true if the ScriptablePipeline object is invalid. (Inherited from Object)

IsSameObjectAs ​

Returns true if the ScriptablePipeline object is valid. (Inherited from Object)

NonNull ​

Returns true if the ScriptablePipeline object is valid. (Inherited from Object)

PrintInfo ​

Prints the content/info of the ScriptablePipeline object to the log. (Inherited from Object)

RemoveObserver ​

Removes a previously added observer object. (Inherited from Object)

Run ​

Runs the pipeline. Make sure to set up Input data package and MainScript script file before running. If the returned error is FailedToRunPipeline, the batch process was successfully run, but the script environment returned a non-zero exit code. Use GetScriptEnvironmentExitCode() to retrieve the exit code from the script environment, and the LogOutput object in the Output package to retrieve the stdout and stderr from the script environment.

SetBatchProcessPath ​

Overrides the path to the SimplygonBatch processor. If left empty, the Simplygon environment path is instead used to find the batch processor.

Static methods details ​

IsClassA ​

Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)

SafeCast ​

SafeCast makes sure the input object is of a class that can be cast into spScriptablePipeline, and if this is the case, returns the object cast into spScriptablePipeline. (Inherited from Object)