Skip to content

01. Blender Rendering scripts

V453000 edited this page Mar 12, 2021 · 4 revisions

You can find some basic scripts here:

https://github.com/wube/Factorio-GFX-tools/tree/main/blender-rendering-scripts

Notes and guidelines:

Keep it simple

Whenever we can and it's feasible, use normal Blender GUI, and only use scripts when it's useful. For example, if you need to render objects on various rotations, don't move objects or camera via script, but just set keyframes. Scripts are harder to read, and much more fragile.

Often used commands

bpy.ops.render.render(animation=True) The most basic command to initiate a render, same as Ctrl+F12

bpy.ops.vtools.generate_render_nodes() Vtools Generate Render Nodes button. Useful if you just want to make sure they are generated with the latest View layers etc.

bpy.ops.vtools.render_multicomputer() Turn on rendering on multiple computers automatically.

for scene in bpy.data.scenes:
  bpy.context.window.scene = scene

Going through all scenes in the .blend file, so you don't need to copy&paste compositor nodes to one Rendering scene.