It's good to have a reminder from time to time that you can run Blender from the command line or from scripts. This makes it a super powerful tool in automated pipelines, like webservers.
John Roper writes:
For new users, running Blender from the command line could seem pointless. Why would you want to? Although Blender 3D is a very stable and secure program, it is still known to crash and have issues at some point. These can be caused by your computer or by what you are doing with it. This does not mean that you are doing something wrong, but programs are known to act up. By starting Blender in the command line, you will have an action-by-action record of what was going on that you can show to people to help you find out what the problem was.
Another reason why you would want to is for rendering purposes. Using the commands shown later in this tutorial, you can actually run blender in the background while rendering so that it is not in your way. Also, you can write scripts to automatically run through folders and render certain files that you want automatically.
In this in depth tutorial, I talk about how to setup blender for command line use on any system and also how to write bash scripts to do automatic rendering with it.
5 Comments
this is a very important thing in blender. we use this for our content-export pipeline.
blender starting very fast, so our pipeline is very fast :)
it may not work if you don't have the X server running in linux because there's no audio interface, that's why i add -noaudio when i'm rendering remotely with SSH
If someone is interested, I wrote a python script to easily setup the background rendering launch and add some feature. Tested only on windows, the script is a bit ugly but work well (I was learning python at that moment).
https://github.com/Pullusb/bgrender
I use a simple script to render all of the figures for a lab manual; it works with multiple scenes and is cross platform (depending on PATH). You can see it at http://pastebin.com/Sp1Gwq8b
I wish I could press the Windows button and have a Terminal running Blender.
I use Ubuntu-MATE, is there a way to do this?