RunScript node
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 / |
Integer |
0 |
|
Type of Parameter 1 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point1 / |
Double |
0 |
A floating point numerical value. |
Integer1 / |
Integer |
0 |
An integer numerical value. |
Type of Parameter 2 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point2 / |
Double |
0 |
A floating point numerical value. |
Integer2 / |
Integer |
0 |
An integer numerical value. |
Type of Parameter 3 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point3 / |
Double |
0 |
A floating point numerical value. |
Integer3 / |
Integer |
0 |
An integer numerical value. |
Type of Parameter 4 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point4 / |
Double |
0 |
A floating point numerical value. |
Integer4 / |
Integer |
0 |
An integer numerical value. |
Type of Parameter 5 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point5 / |
Double |
0 |
A floating point numerical value. |
Integer5 / |
Integer |
0 |
An integer numerical value. |
Type of Parameter 6 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point6 / |
Double |
0 |
A floating point numerical value. |
Integer6 / |
Integer |
0 |
An integer numerical value. |
Type of Parameter 7 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point7 / |
Double |
0 |
A floating point numerical value. |
Integer7 / |
Integer |
0 |
An integer numerical value. |
Type of Parameter 8 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point8 / |
Double |
0 |
A floating point numerical value. |
Integer8 / |
Integer |
0 |
An integer numerical value. |
Type of Parameter 9 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point9 / |
Double |
0 |
A floating point numerical value. |
Integer9 / |
Integer |
0 |
An integer numerical value. |
Type of Parameter 10 / |
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 / |
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 / |
String |
A string (or sequence of characters). |
|
Floating Point10 / |
Double |
0 |
A floating point numerical value. |
Integer10 / |
Integer |
0 |
An integer numerical value. |
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 / |
Boolean |
Off |
Validate the script contents and execute it on next render. This locks the script and all its parameters. |