RunScript node

pluginIcon

This documentation is for version 1.0 of RunScript (fr.inria.openfx.RunScript).

Description

Run a script with the given arguments. This is mostly useful to execute an external program on a set of input images files, which outputs image files. Writers should be connected to each input, so that the image files are written before running the script, and the output of this node should be fed into one or more Readers, which read the images written by the script.

Sample section of a node graph which uses RunScript:

              ...
               ^
               |
Write([Project]/scriptinput#####.png)
               ^
               |
RunScript1(processes [Project]/scriptinput#####.png, output is [Project]/scriptoutput#####.png)
               ^
               |
Read([Project]/scriptoutput#####.png, set the frame range manually)
               ^
               |
RunScript2(deletes temporary files [Project]/scriptinput#####.png and [Project]/scriptoutput#####.png, optional)
               ^
               |
              ...

Keep in mind that the input and output files are never removed in the above graph. The output of RunScript is a copy of its first input.

Each argument may be:

  • A filename (RunScript1 and RunScript2 in the example above should have [Project]/scriptinput#####.png and [Project]/scriptoutput#####.png as filename parameters 1 and 2)
  • A floating-point value (which can be linked to any plugin)
  • An integer
  • A string

Under Unix, the script should begin with a traditional shebang line, e.g. ‘#!/bin/sh’ or ‘#!/usr/bin/env python’ The arguments can be accessed as usual from the script (in a Unix shell-script, argument 1 would be accessed as “$1” - use double quotes to avoid problems with spaces). For example, the script in RunScript2 in the above example would be:

#!/bin/sh
rm "$1" "$2"

This plugin uses pstream (http://pstreams.sourceforge.net), which is distributed under the Boost Software License, Version 1.0.

Inputs

Input Description Optional
1   Yes
2   Yes
3   Yes
4   Yes

Controls

Parameter / script name Type Default Function
Number of Parameters / paramCount Integer 0  
Type of Parameter 1 / type1 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name1 / filename1 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String1 / string1 String   A string (or sequence of characters).
Floating Point1 / double1 Double 0 A floating point numerical value.
Integer1 / integer1 Integer 0 An integer numerical value.
Type of Parameter 2 / type2 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name2 / filename2 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String2 / string2 String   A string (or sequence of characters).
Floating Point2 / double2 Double 0 A floating point numerical value.
Integer2 / integer2 Integer 0 An integer numerical value.
Type of Parameter 3 / type3 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name3 / filename3 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String3 / string3 String   A string (or sequence of characters).
Floating Point3 / double3 Double 0 A floating point numerical value.
Integer3 / integer3 Integer 0 An integer numerical value.
Type of Parameter 4 / type4 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name4 / filename4 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String4 / string4 String   A string (or sequence of characters).
Floating Point4 / double4 Double 0 A floating point numerical value.
Integer4 / integer4 Integer 0 An integer numerical value.
Type of Parameter 5 / type5 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name5 / filename5 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String5 / string5 String   A string (or sequence of characters).
Floating Point5 / double5 Double 0 A floating point numerical value.
Integer5 / integer5 Integer 0 An integer numerical value.
Type of Parameter 6 / type6 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name6 / filename6 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String6 / string6 String   A string (or sequence of characters).
Floating Point6 / double6 Double 0 A floating point numerical value.
Integer6 / integer6 Integer 0 An integer numerical value.
Type of Parameter 7 / type7 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name7 / filename7 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String7 / string7 String   A string (or sequence of characters).
Floating Point7 / double7 Double 0 A floating point numerical value.
Integer7 / integer7 Integer 0 An integer numerical value.
Type of Parameter 8 / type8 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name8 / filename8 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String8 / string8 String   A string (or sequence of characters).
Floating Point8 / double8 Double 0 A floating point numerical value.
Integer8 / integer8 Integer 0 An integer numerical value.
Type of Parameter 9 / type9 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name9 / filename9 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String9 / string9 String   A string (or sequence of characters).
Floating Point9 / double9 Double 0 A floating point numerical value.
Integer9 / integer9 Integer 0 An integer numerical value.
Type of Parameter 10 / type10 Choice File Name

File Name: . A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String: A string (or sequence of characters).
Floating Point: A floating point numerical value.
Integer: An integer numerical value.
File Name10 / filename10 N/A  
A constant or animated string containing a filename.
If the string contains hashes (like ####) or a printf token (like %04d), they will be replaced by the frame number, and if it contains %v or %V, it will be replaced by the view ID (“l” or “r” for %v, “left” or “right” for %V).
This is usually linked to the output filename of an upstream Writer node, or to the input filename of a downstream Reader node.
String10 / string10 String   A string (or sequence of characters).
Floating Point10 / double10 Double 0 A floating point numerical value.
Integer10 / integer10 Integer 0 An integer numerical value.
Script / script String #!/bin/sh
Contents of the script. Under Unix, the script should begin with a traditional shebang line, e.g. ‘#!/bin/sh’ or ‘#!/usr/bin/env python’
The arguments can be accessed as usual from the script (in a Unix shell-script, argument 1 would be accessed as “$1” - use double quotes to avoid problems with spaces).
Validate / validate Boolean Off Validate the script contents and execute it on next render. This locks the script and all its parameters.