Questions tagged [command-line]

Questions pertaining to using Blender from the command line or using Blender's console window.

Filter by
Sorted by
Tagged with
92 votes
4 answers
88k views

How can I run blender from command line or a python script without opening a GUI?

I'm interested in using Blender for producing images, 3d files, or calculating geometry on a server. Can I make blender run a python script without opening a GUI? If not, can I incorporate Blender's ...
BenjaminGolder's user avatar
70 votes
5 answers
40k views

How to pass command line arguments to a Blender Python script?

Let's say we have a Python script my_script.py that does some data processing with Blender. This script accepts some arguments (e.g. ...
BenC's user avatar
  • 803
35 votes
4 answers
28k views

Is there a way to batch render multiple scenes?

I have animations in 4 different scenes in my Blender file that I would like to batch render. Is there a way to batch render all the scenes, instead of only the scene I am working in?
Krazer's user avatar
  • 555
30 votes
2 answers
16k views

Can Cycles renders be done from the command line?

It seems that Cycles is mainly built in the form of Python scripts (as far as I can tell). Is it still possible to use Cycles to render a .blend file from the ...
A Wild RolandiXor Has Appeared's user avatar
22 votes
3 answers
22k views

Blender rendering automation (build script)

I would like to automate the proccess of rendering images (sprites). What I want to do is to render an image of the same model with different textures, ideally the texture filename would be passed as ...
eyevan's user avatar
  • 323
21 votes
4 answers
20k views

Is there anyway to make blender print errors in the UI?

For some reason, sometimes error messages encountered while scripting are not printed in the info panel, only the message ...
gandalf3's user avatar
  • 157k
19 votes
4 answers
12k views

Can blend files be queued for animation rendering?

I would like to be able to render several files one after the other, when I am not using my computer, e.g. at night. Is there a way of doing this?
SteveW's user avatar
  • 2,232
17 votes
2 answers
11k views

How to get Blender's version number from Python?

How do I go about programmatically getting the Blender version number? Example: If I am running Blender 2.76, how would I get the version number from the python console?
Greg's user avatar
  • 633
15 votes
3 answers
14k views

How to use blender command lines in OSX?

Update: NB: This is a revised and updated version of my original question. You can also see the relevant discussion on meta as to why it was closed and reopened. On June 29th I asked what I thought ...
SteveW's user avatar
  • 2,232
14 votes
3 answers
5k views

Can you clear the System Console without restarting Blender?

The question is simple enough, but I can't find the answer. Is there an operator or something similar that clears the Blender System Console history? I would also be willing to create an operator type ...
Noob Cat's user avatar
  • 1,222
14 votes
6 answers
23k views

How to open system console to get output from Blender on Mac OS 10?

Noobie here. Should I open Mac terminal and cd to /Applications/Blender/ which is where my Blender app is? Doesn't seem to work for me trying to run script from Text screen in Blender. I guess there ...
Dick Meehan's user avatar
13 votes
1 answer
12k views

Setting render options from the command line

I was hoping to render blender using the command line mode on linux. However, I do not no how to set the output resolution and H.264 as the encoding. Both these options work in the GUI mode but I wish ...
Shenal Silva's user avatar
12 votes
2 answers
4k views

Headless Blender using Cycles without X-server?

I would like to render with Cycles on a headless machine, without an X-server. Has anyone done this with success? I am getting the following error on Linux using Blender 2.78a: $: blender -b cube....
m88's user avatar
  • 143
11 votes
3 answers
10k views

How to view the system console message after Blender crashes?

I am testing a script in Blender game engine. I can view the helpful message on the external system console when the script throws exception. Sometimes the bugs of the script cause the Blender to ...
ShungChing's user avatar
11 votes
1 answer
4k views

Render with openGL from the command line?

Is it possible to use the openGL quick render for rendering from the command line? e.g. something like blender -b <file> -E opengl -f 1
gandalf3's user avatar
  • 157k
11 votes
3 answers
5k views

Silent command line rendering

I'm using a simple script to create and render a scene and when I run the script from command-line as blender --background --python hello.py it prints lots of lines ...
Ecir Hana's user avatar
  • 275
10 votes
1 answer
4k views

Auto-run scripts security options

We have a preferences option to enable auto-run of python scripts when opening blend files. We can also add paths that are excluded from auto-running scripts. Then we have a cli options to enable or ...
sambler's user avatar
  • 55.5k
10 votes
1 answer
3k views

How to get actual rendering progress and estimation from render_stats python handler?

There is render_stats bpy handler It seem like it is invoked every time rendering engine prints to console smth like ...
andll's user avatar
  • 213
9 votes
1 answer
19k views

How to use Keyframes and the Python API programmatically?

Currently I have a default cube and 400 frames. Here's what I have working without keyframing ...
Julian's user avatar
  • 581
9 votes
3 answers
5k views

Get number of frames in scene from the command line?

I'd like to know if there is a command-line option (or combination, or a way!) to get the number of frames that are included in a specified blender scene; for example I'd like to use is like this: <...
jtimz's user avatar
  • 193
9 votes
1 answer
5k views

How to increase the scrollback history of the Python console/terminal within Blender?

How can I increase the size of the command history in the Python console? The console options don't provide any option for doing this. Like Maya's unlimited output section in the script editor.
Bleeding Fingers's user avatar
9 votes
1 answer
6k views

Specify tile size for Blender Cycles rendering via the command line

I'd like to write a little piece of code which splits a frame into a few tiles and uses all available devices to render the still image. It seems like the Blender developers are working on such a ...
user1344's user avatar
9 votes
1 answer
2k views

Abort script that renders frames

My script runs through a for loop, each time rendering a frame. How can I abort the script? Normally, I'd use CTL+C in the terminal Blender was launched from, but ...
Garrett's user avatar
  • 6,596
9 votes
1 answer
737 views

Can loopcuts be made when Blender is in background with the "-b" option?

I am trying to make loopcuts on an object in a Python script running Blender 2.77a in the background with the "-b" commandline option. If I don't override the context I get this error: ...
X-Mann's user avatar
  • 191
8 votes
2 answers
7k views

Rendering on command-line with GPU?

I am trying to submit a render job via slurm on our cluster with blender 2.8, that is, completely command-line based with no way to start the GUI on the computing nodes. I have assigned 38 CPU to the ...
mcandril's user avatar
  • 203
8 votes
1 answer
11k views

How can I run blender from the command line to export and import models

I am interested in exporting and importing 3d models using blender via the command line, as mentioned in this question. So now I want to know how I can import and export the models in blender with ...
Jothi Kannan's user avatar
8 votes
1 answer
387 views

how to configure facility wide configuration files

We'd like to integrate Blender into our pipeline. With other software packages, we usually have cascading configurations: facility (eg configuring temp folders and common plugins) project (eg project ...
maxdownunder's user avatar
7 votes
2 answers
7k views

How to write the output of Blender console out to a file

Is it possible to launch Blender in a mode where everything that appears in the Blender Console is sent to a file?
Jeepster's user avatar
  • 135
7 votes
2 answers
1k views

What does "Invalid clnors in this fan!" mean?

When I open or render a frame of one specific scene, I have several messages in the Console with the note "Invalid clnors in this fan!" This message also shows up ...
Antonio Buch's user avatar
  • 2,177
7 votes
2 answers
3k views

Batch generate preview/thumbnail image for old files?

I got hundreds of old files (some are from 2.4x) that need to generate Preview/thumbnail images with the new Blender version. I think the straightforward way is to open and save each files to generate,...
Leon Cheung's user avatar
  • 27.7k
7 votes
1 answer
9k views

How to render in command line? [duplicate]

I have a very very slow computer, but would like to animate 3D. I'm aware we can render via the command line. but I don't know how. I want to render the entire animation of my Tutorial.blend file in ...
Tong's user avatar
  • 71
7 votes
2 answers
2k views

How do I set a specific render engine while launching blender?

I have noticed that Blender Internal Render Engine is the default engine that is set when launching Blender. Users can change this behavior by setting a different engine and saving the user ...
satishgoda's user avatar
  • 8,074
7 votes
2 answers
3k views

Access blender interactive python shell from terminal

Is it possible to get access to the blender interactive python shell from a terminal? I know I can start a python script with the the following command ...
Miguellissimo's user avatar
7 votes
1 answer
2k views

Run multiple Python scripts in Blender from the command-line

I have 8 python scripts and I need to lunch them at once. For one script, I used blender --background --python script1.py for the eight scripts, I tried this ...
BetterEnglish's user avatar
6 votes
3 answers
9k views

Install Addons in Headless Blender

Is it possible to install a Blender addon in headless mode? I need the ability to export gltfs from a Ubuntu server instance and the only instructions I can find for installing an addon in Blender is ...
NeonMonk's user avatar
6 votes
3 answers
7k views

How to make Blender exit after running Python script from command line?

I have the problem that Blender does not exit after executing in background mode from command line. For example this command: ./blender -b -P test.py gives me ...
Mikkel's user avatar
  • 163
6 votes
1 answer
13k views

I can't load an image from a script

I'm trying to use Blender's mesh displacement from a script to create stl's. Once this works, I'll run blender with --background to create the stl files from the command line. I start Blender with: <...
S'rCat's user avatar
  • 253
6 votes
1 answer
2k views

How to set the render-output using arbitrary values?

When rendering, it can be useful to automate setting the output file path using existing data from within the blend file. Is it possible to use variables in the render output path? eg, ...
ideasman42's user avatar
  • 47.4k
6 votes
2 answers
2k views

How do you set the "current image" as far as bpy is concerned?

How do you set the current image ( or current anything for that matter ) from a script or command console? I want to use something like bpy.ops.image.reload() ...
S'rCat's user avatar
  • 253
6 votes
1 answer
141 views

Measure or log eevee compile times?

I am trying to troubleshoot some compile times on a complex setup. In order to do this properly, I need to be able to check how long it takes Eevee to compile in various different configurations (you ...
Ascalon's user avatar
  • 6,599
6 votes
1 answer
9k views

Render on GPU from command line on Ubuntu server

For best render performance and more free VRAM I installed Blender on an Ubuntu server without GUI. I launched Blender from the command line using argument and all was OK, but after installing it ...
igor's user avatar
  • 61
5 votes
1 answer
10k views

Rendering a cube as png file using Blender's Python API

I am new to Blender. I create a cube and want to render it. Since, we are later going to do this for large number of shapes, we are working with Blender's Python API. I want to save this rendering as ...
Dreams's user avatar
  • 161
5 votes
1 answer
10k views

Blender script run print to console [duplicate]

How can I run some script and have print result in console window? Now I have these results only in System Console Window.
piotrek's user avatar
  • 261
5 votes
4 answers
2k views

Generate thumbnail image in addition to main image? (command line render)

I'd like to set up a command line script that renders out each frame to the desired output image type (EXR, PNG, TGA, etc.) at full resolution, but then also generates and saves a small thumbnail JPG ...
Todd McIntosh's user avatar
5 votes
2 answers
3k views

Calling Python Function from Console

Would it be possible to call Python codes I wrote in Text Editor from the Python console so that I can interact with it?
Blender Sushi Guy's user avatar
5 votes
1 answer
4k views

What values do the --verbose and --debug-value options accept?

Running blender with either blender --verbose or blender --debug-value returns ...
gandalf3's user avatar
  • 157k
5 votes
1 answer
546 views

Command line script renders without shaders

I'm trying to render a simple scene using the Python API. I've created a red cube in blender and want to output it using the Python API. The only things I've changed from the default new file is the ...
runfalk's user avatar
  • 153
5 votes
1 answer
15k views

How do I get the console on windows?

How do I get the console on windows? I opened the python console and it does nothing, and it isn't open on startup.
GiantCowFilms's user avatar
5 votes
2 answers
2k views

Is it possible to quit blender from the command line?

Is there a way to quit blender from the command line? I tried killall -s QUIT blender However, blender does not quit the same way as it does when pressing ...
gandalf3's user avatar
  • 157k
5 votes
1 answer
10k views

How do I import a fbx file into blender from command line?

I would like to import a fbx file (3Ds Max scene file) and save the project from the command line, how can I do this?
Chunlin Hu's user avatar

1
2 3 4 5
9