This is a script for cli-rendering with Blender on a single machine.
The queue is a simple text-file where each job is a line:
/path/to/blenderfile.blend -c 1 -f 1..100, 150, 151 -p render_settings.py
Flags are:
-cchunksize-fframes to render: ranges and single frames-poptional python script to make scene changes through Blenders API (e.g. use it for render settings)
The queue can be updated and changed. After finishing a chunk, the script reads the file again and reacts to the changes.
The script looks at the output directories of each job to figure out the list of missing frames.
The queue can contain a line with global switches:
switches: -jump -mod 0,5,2,8,1,9,3,7,4,6 -c 10
-jumpjump to next job after finishing a chunk-modonly render frames that end on a number. This list is a progression: when all frames ending on0are rendered, continue with frames ending on5-ca global chunksize override
-jump combined with -mod is extremely helpful for getting frames of many passes/takes ready for compositing fast.
The compositing file could even be added as the last job in the queue and thereby output comped frames for frames where all required pass/take frames are present.
Interrupt the script with CTRL c. A cleanup function will terminate the render subprocess.
The script checks the image sequences in the output directories to figure out the list of missing frames. If you want frames re-rendered, just delete/move them from the output.
The output is set by the script.
Frames are written to a render directory next to the .blend file.
Folder and image name is same as the .blend file:
.
├── render/
│ ├── file_a/
│ │ └── file_a.####.exr
│ ├── file_b/
│ │ └── file_b.####exr
│ └── file_c/
│ └── file_c.####.exr
├── file_a.blend
├── file_b.blend
└── file_c.blendRun the script and specify the queue file:
python simple_render_queue.py q.render