RF_* environment variables, a Python step imports renderflow and reads the same facts as ordinary Python objects, plus a few conveniences a shell script does not get: a progress bar, a log level, and a clean way to fail with a sentence instead of a traceback.
Adding one
1
Add the step
Press the + button at the end of the chain and pick Python.
2
Give it a script
Either press Browse file and pick a
.py file off disk, or press Type and write it in the editor.3
Add arguments, if it takes any
The Arguments field becomes
sys.argv for your script, the same as a Shell step’s Arguments field.Reading the job
RF_JOB_NAME, RF_TASK_INDEX and the rest: the same facts, as attributes instead of environment variables.
Reusing another step’s output
Paths across machines
P:/shots/010. A Linux node mounts the same folder at /mnt/shots/010. rf.path() returns the form this machine uses, through the farm’s mapping table, so use it on any path: a step’s input or output, an argument, or one you built yourself.
Saying how it is going
print() reaches the log too; rf.log only adds a level tag. rf.fatal (or raising rf.Fatal) is how a script ends itself on purpose: the operator reads your sentence rather than a traceback.
Example
How a Python step ends
rf.Fatal and an uncaught exception both end the script with exit code 1, and the difference is what the operator reads: Fatal shows your sentence, an uncaught exception shows a traceback.