Аргументы командной строки

Использование Blender 2.79: blender [args …] [file] [args …]

Опции рендера

-b, --background
Run in background (often used for UI-less rendering).
-a, --render-anim
Render frames from start to end (inclusive).
-S, --scene <name>
Set the active scene <name> for rendering.
-f, --render-frame <frame>

Render frame <frame> and save it.

  • +<frame> start frame relative, -<frame> end frame relative.
  • A comma separated list of frames can also be used (no spaces).
  • A range of frames can be expressed using .. seperator between the first and last frames (inclusive).
-s, --frame-start <frame>
Установить стартовый кадр в <frame>, поддерживает +/- для относительных фреймов.
-e, --frame-end <frame>
Установить конечный кадр в <frame>, поддерживает +/- для относительных фреймов.
-j, --frame-jump <frames>
Set number of frames to step forward after each rendered frame.
-o, --render-output <path>

Set the render path and file name. Use // at the start of the path to render relative to the blend-file.

Символы # заменяются номером кадра, и используются для выравнивания номера нулями слева.

  • ani_##_test.png станет ani_01_test.png
  • test-######.png станет test-000001.png

Если имя файла не содержит символов #, по умолчанию к имени добавится суффикс ####.

Номер кадра будет добавлен в конец имени файла, т.е.:

blender -b foobar.blend -o //render_ -F PNG -x 1 -a

//render_ станет //render_####, для которого будут записаны фреймы вида //render_0001.png

-E, --engine <engine>
Specify the render engine. Use -E help to list available engines.
-t, --threads <threads>
Use amount of <threads> for rendering and other operations [1-64], 0 for systems processor count.

Опции формата

-F, --render-format <format>

Set the render format. Valid options are TGA RAWTGA JPEG IRIS IRIZ AVIRAW AVIJPEG PNG BMP

Formats that can be compiled into Blender, not available on all systems: HDR TIFF EXR MULTILAYER MPEG FRAMESERVER CINEON DPX DDS JP2

-x, --use-extension <bool>
Set option to add the file extension to the end of the file.

Опции проигрывания анимации

-a <options> <file(s)>

Проигрывает файлы <file(s)>, но только когда программа работает не в фоновом режиме.

-p <sx> <sy>
Open with lower left corner at <sx>, <sy>.
-m
Read from disk (Do not buffer).
-f <fps> <fps-base>
Specify FPS to start with.
-j <frame>
Set frame step to <frame>.
-s <frame>
Play from <frame>.
-e <frame>
Play until <frame>.

Опции окна

-w, --window-border
Force opening with borders.
-W, --window-borderless
Force opening without borders.
-p, --window-geometry <sx> <sy> <w> <h>
Open with lower left corner at <sx>, <sy> and width and height as <w>, <h>.
-con, --start-console
Start with the console window open (ignored if -b is set), (Windows only).
--no-native-pixels
Do not use native pixel size, for high resolution displays (MacBook Retina).

Отдельные опции игрового движка

-g Отдельные опции игрового движка

fixedtime
Run on 50 hertz without dropping frames.
vertexarrays
Use Vertex Arrays for rendering (usually faster).
nomipmap
No Texture Mipmapping.
linearmipmap
Linear Texture Mipmapping instead of Nearest (default).

Опции Python

-y, --enable-autoexec
Enable automatic Python script execution (default).
-Y, --disable-autoexec
Disable automatic Python script execution (pydrivers & startup scripts).
-P, --python <filename>
Run the given Python script file.
--python-text <name>
Run the given Python script text block.
--python-expr <expression>
Run the given expression as a Python script.
--python-console
Run Blender with an interactive console.
--python-exit-code
Установить код выход (exit-code) в [0..255], когда возникает исключение Python (только для скриптов, выполняемых из командной строки); ноль - отключает код выхода.
--addons
Comma separated list of add-ons (no spaces).

Опции отладки

-d, --debug

Turn debugging on.

  • Включает обнаружение ошибок памяти
  • Отключает захват мыши для взаимодействия с отладчиком
  • Сохраняет sys.stdin Python (не устанавливает его в None)
--debug-value <value>
Set debug value of <value> on startup.
--debug-events
Enable debug messages for the event system.
--debug-ffmpeg
Enable debug messages from FFmpeg library.
--debug-handlers
Enable debug messages for event handling.
--debug-libmv
Enable debug messages from libmv library.
--debug-cycles
Enable debug messages from Cycles.
--debug-memory
Enable fully guarded memory allocation and debugging.
--debug-jobs
Разрешает профилирование времени для фоновых задач
--debug-python
Enable debug messages for Python.
--debug-depsgraph
Enable debug messages from dependency graph.
--debug-depsgraph-no-threads
Switch dependency graph to a single threaded evaluation.
--debug-gpumem
Enable GPU memory stats in status bar.
--debug-wm
Enable debug messages for the window manager, also prints every operator call.
--debug-all
Enable all debug messages.
--debug-io
Enable debug messages for I/O (collada, …).
--debug-fpe
Enable floating point exceptions.
--disable-crash-handler
Disable the crash handler.

Различные опции

--factory-startup
Skip reading the startup.blend in the user’s home directory.
--env-system-datafiles
Set the BLENDER_SYSTEM_DATAFILES environment variable.
--env-system-scripts
Set the BLENDER_SYSTEM_SCRIPTS environment variable.
--env-system-python
Set the BLENDER_SYSTEM_PYTHON environment variable.
-nojoystick
Disable joystick support.
-noglsl
Disable GLSL shading.
-noaudio
Force sound system to None.
-setaudio
Force sound system to a specific device. NULL SDL OPENAL JACK.
-h, --help
Print this help text and exit.
-R
Register blend-file extension, then exit (Windows only).
-r
Silently register blend-file extension, then exit (Windows only).
-v, --version
Print Blender version and exit.
--
End option processing, following arguments passed unchanged. Access via Python’s sys.argv.

Experimental Features

--enable-new-depsgraph
Use new dependency graph.
--enable-new-basic-shader-glsl
Use new GLSL basic shader.

Прочие опции

/?
Print this help text and exit (windows only).
--debug-freestyle
Enable debug messages for FreeStyle.
--debug-gpu
Разрешает отладочный контекст GPU и информацию для OpenGL 4.3+.
--disable-abort-handler
Disable the abort handler.
--verbose <verbose>
Установить уровень логирования

Разбор аргументов

Аргументы должны быть разделены пробелами, т.е.

blender -ba test.blend

…will ignore the a.

blender -b test.blend -f8

…will ignore 8 because there is no space between the -f and the frame value.

Порядок аргументов

Аргументы обрабатываются в том порядке, в котором они заданы, т.е.

blender --background test.blend --render-frame 1 --render-output '/tmp'

…will not render to /tmp because --render-frame 1 renders before the output path is set.

blender --background --render-output /tmp test.blend --render-frame 1

…will not render to /tmp because loading the blend-file overwrites the render output that was set.

blender --background test.blend --render-output /tmp --render-frame 1

… работает как это и указано.

Переменные окружения

BLENDER_USER_CONFIG:
 Каталог для конфигурационных файлов пользователя
BLENDER_USER_SCRIPTS:
 Каталог для пользовательских скриптов
BLENDER_SYSTEM_SCRIPTS:
 Каталог для общесистемных скриптов
BLENDER_USER_DATAFILES:
 Каталог для пользовательских файлов данных (иконы, переводы и пр.)
BLENDER_SYSTEM_DATAFILES:
 Каталог для общесистемных файлов данных
BLENDER_SYSTEM_PYTHON:
 Directory for system Python libraries.
TEMP:Сохранять временные файлы сюда
TMP:или $TMPDIR Сохранять временные файлы сюда
SDL_AUDIODRIVER:
 Аудиодрайвер LibSDL - alsa, esd, dma.
PYTHONHOME:Path to the Python directory, eg. /usr/lib/python.