Toggle Blender's Build Options

A little script I use to speed up compiling Blender

My work on Blender mostly involves the Animation & Rigging module. For this, I can do without Cycles, USD, Alembic, Collada, and some other modules. Disabling those modules allows me to build Blender faster. It would be even faster to disable everything you can disable, but that would disable way too much. Also, it’s hard to change it back, because you can’t just enable everything either.

So, as usual, I wrote a little script to do this for me. Save the script below to your build directory, and name it Then create a symlink ln -s


MY_BASE=$(basename "$0")
MY_DIR=$(dirname $(readlink -f $0))

case $MY_BASE in
        echo "Unknown name $MY_BASE" >&2
        exit 47

set -ex
cd $MY_DIR
cmake \
    -DWITH_USD=${WITH} \
nice -n 20 ninja -C $MY_DIR

I made a similar script for enabling and disabling tests, which only sets the WITH_GTESTS build option. I’ll leave that as an exercise for the reader.

This post was made possible by the Blender Development Fund.

dr. Sybren A. Stüvel
dr. Sybren A. Stüvel
Open Source software developer, photographer, drummer, and electronics tinkerer