Navigation
API > API/Plugins > API/Plugins/MovieRenderPipelineCore
This is the base class used for writing scripts that can be executed as part of a Movie Graph Pipeline. After creating a UMovieGraphExecuteScriptNode (named 'Execute Script' in the UI) in your Movie Graph Configuration asset, and choosing the type of your script, an instance will be created when the job starts. This instance will persist until the end of the job. The instance will recieve callbacks during the render which contain data that you can manipulate with your script, or data that was generated by the pipeline.
This can be implemented in either C++ or Python. For C++ you can use standard inheritance but for Python you need to write a UClass implemented in Python. This has slightly different syntax than standard Python;
In this example, create a "Python" folder in your Content folder. Then create a file named "MovieGraphPipelineScriptExample.py", and a file named "init_unreal.py"
In "init_unreal.py" add "import MovieGraphPipelineScriptExample" as the contents. In "MovieGraphPipelineScriptExample.py" use the following:
import unreal @unreal.uclass() class MovieGraphPipelineScriptExample(unreal.MovieGraphScriptBase): @unreal.ufunction(override=True) def on_job_start(self, in_job_copy): super().on_job_start(in_job_copy) unreal.log("OnJobStart")
Save and restart Unreal Editor, then create a Movie Graph Configuration with an Execute Script Node, and set it to run MovieGraphPipelineScriptExample. When the job is run, the output console should print "OnJobStart" as a warning.
Use "help(unreal.MovieGraphScriptBase)" in the Python Console to see all available overridable functions.
See /Engine/Plugins/MovieScene/MovieRenderPipeline/Content/Python/MovieGraphScriptNodeExample.py for more python examples.
| Name | UMovieGraphScriptBase |
| Type | class |
| Header File | /Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Public/Graph/Nodes/MovieGraphExecuteScriptNode.h |
| Include Path | #include "Graph/Nodes/MovieGraphExecuteScriptNode.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, Abstract)
class UMovieGraphScriptBase : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UMovieGraphScriptBase
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsPerShotCallbackNeeded () |
If you return true here the system will stall at the end of every shot and wait until all files have been written to disk before invoking this callback. | Graph/Nodes/MovieGraphExecuteScriptNode.h |
|
virtual bool IsPerShotCallbackNeeded_Implementation() |
Graph/Nodes/MovieGraphExecuteScriptNode.h |
|
|
void OnJobFinished
(
UMoviePipelineExecutorJob* InJobCopy, |
This callback is called at the very end of the Movie Graph Pipeline, right before shutting down. | Graph/Nodes/MovieGraphExecuteScriptNode.h |
|
virtual void OnJobFinished_Implementation
(
UMoviePipelineExecutorJob* InJobCopy, |
Graph/Nodes/MovieGraphExecuteScriptNode.h |
|
|
void OnJobStart
(
UMoviePipelineExecutorJob* InJobCopy |
This callback is called very early on in the Movie Graph Pipeline, before data is read from the job. | Graph/Nodes/MovieGraphExecuteScriptNode.h |
|
virtual void OnJobStart_Implementation
(
UMoviePipelineExecutorJob* InJobCopy |
Graph/Nodes/MovieGraphExecuteScriptNode.h |
|
|
void OnShotFinished
(
UMoviePipelineExecutorJob* InJobCopy, |
This is similar to OnJobFinished but called after a shot is completed. | Graph/Nodes/MovieGraphExecuteScriptNode.h |
|
virtual void OnShotFinished_Implementation
(
UMoviePipelineExecutorJob* InJobCopy, |
Graph/Nodes/MovieGraphExecuteScriptNode.h |
|
|
void OnShotStart
(
UMoviePipelineExecutorJob* InJobCopy, |
This is similar to OnJobStart but called before a shot is set up. | Graph/Nodes/MovieGraphExecuteScriptNode.h |
|
virtual void OnShotStart_Implementation
(
UMoviePipelineExecutorJob* InJobCopy, |
Graph/Nodes/MovieGraphExecuteScriptNode.h |
|