Questions tagged [command-line]

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

161 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
397 views

Rendering to Viewer Node in headless mode

I'm running Blender 2.79: /path/to/blender -b empty.blend -P script.py With script.py: ...
ebsddd's user avatar
  • 151
3 votes
0 answers
77 views

Specify the order of execution for a Blender plugin and an external script?

I'm trying to use an external script at the same time with a Blender plugin but I am having a few issues because I believe the script is being computed/processed before the plugin and for this ...
Johnny R.'s user avatar
3 votes
0 answers
345 views

How can I render on SSH Linux machine?

I downloaded linux version from this official page and extracted files onto as folder. Created a very basic default cube file and uploaded it to via WinSCP as well. When I try to execute this line. <...
Kayra Uckilinc's user avatar
3 votes
0 answers
923 views

Why is area.type None when starting Blender + script from CMD?

coders! I get an unnerving error im my python script when running blender 2.91 (same for 2.92) from the command-line under windows 10 and executing a python script on the blend-file with the ...
oystersauce's user avatar
3 votes
0 answers
394 views

How do I render a render view layer using the command line in Blender 2.8

It is possible to render using a specific scene but I did not see how to select only a view layer. The only solution I found is by unchecking the "Use for Rendering" button for each undesired layers, ...
Chouettou's user avatar
  • 161
3 votes
0 answers
296 views

Running a tracking script with Blender in the background

Im trying to run a script that when Blender is opening through the command line with this script it will track the clip it is being open with. I have a script that already opens the Blender file with ...
CSSmitty's user avatar
  • 166
3 votes
0 answers
510 views

How to reduce Cycles logging output?

when rendering scenes on the farm, the created logfiles get huge. Is there a way to reduce cycles log output? --verbose didn't work for me... Thx
knekke's user avatar
  • 1,331
2 votes
0 answers
129 views

How can I iterate and print all elements of a Menu (not objects or elements on scene)?

I'm having this little problem that is already costing me more than 24h of research hahaha. I didn't find the answer in any forum and I can't solve it myself in blender. My question is quite simple. I ...
Charles - charbavito - Barros's user avatar
2 votes
0 answers
53 views

How to save all render views when rendering from command line

I have a quite big file with which I have troubles working through the UI. So I have seen it is possible to launch rendering from command line. My scene is a single frame anyway with 5 render views (...
Federico Tomasi's user avatar
2 votes
1 answer
617 views

Viewport Render Animation - From the Command Line

Inside of the 3D Viewport, there is an option available to perform a 'Viewport Render Animation'. My understanding of this feature is that it performs a full render, using viewport settings across ...
Roobles's user avatar
  • 21
2 votes
0 answers
359 views

Blender free up memory using command line

Note: This is my first post, so if my title is not appropriate, please let me know what an alternative could be for more relevant answers :) I am rendering a scene for someone(so no way for me to ...
Albertus Brand Venter's user avatar
2 votes
0 answers
179 views

Is there a way to auto name my AOV outputs?

So in most other software I use like Houdini and C4D there are tokens you can use to assign auto naming conventions such as the $ (dollar sign) expression. In C4D <...
Akira Dawson's user avatar
2 votes
0 answers
29 views

Accessing Python Command Line Script Objects

If I generate an object in a python script e.g. called draw_a_cube.py def my_mesh_func(*kwargs): return useful_mesh ...
alistairboyer's user avatar
2 votes
0 answers
647 views

"Unable to open a display" AWS EC2 Background Rendering

I launched an AWS EC2 T3 Medium Ubuntu 20.04 instance and installed blender 2.83.9 When I launch the simple command line blender -b -f 1 I get this error message : <...
johnconnor's user avatar
2 votes
0 answers
1k views

blender on server with command line : Calling operator "bpy.ops.import_scene.gltf" error

I am building a 3D web app with threejs, in javascript. For renders, i want to use a renderfarm, so : i save threejs scenes in .glTF i command line blender to import and save these scene in .blend ...
Mza David's user avatar
2 votes
0 answers
244 views

Launching blender on the command line results in a error

When I launch blender from the command line, it results in the following error: ...
user avatar
2 votes
0 answers
138 views

Using Knife_project in command line

I have developped an addon and I want to call a few function from command line. Everything works fine except when I'm using knife_project. Here is my code: ...
Turgal's user avatar
  • 121
2 votes
0 answers
89 views

How to render only audio from command line?

Yes, how do we render ONLY audio from command line? I know there is an option to do it from the GUI, but I don't want that. Don't be too critical, as I'm still a newbie. Thanks.
El Flea's user avatar
  • 186
2 votes
0 answers
147 views

Calling blender in PHP outputs nothing

I'm currently running a python script in my command line that uses blender: blender -b -P script.py -- argument1 This works fine in my terminal however it ...
Steven Newhouse's user avatar
2 votes
0 answers
82 views

Why is there a difference in getsizeof() returns for Blender's python console and Python Shell? (for basic types)

This is a getsizeof() return for basic types in blender's python console: And this is one (same args) in Python Shell:
user avatar
2 votes
0 answers
993 views

How to ensure Blender uses the GPU when running from the command line on a headless Linux computer?

I have Blender installed on a Linux machine with 6 Nvidia GPUs (GTX 1060) I have an ssh connection into it but it doesn’t look like Blender is using the GPUs. The ...
snazzyconnor's user avatar
2 votes
0 answers
281 views

CLI (linux) rendering cycles, and cpu + GPU

I'm currently testing my first try at the rendering cycles on the CLI in Linux. this is the script I wrote for it. I was wondering what about using the GPU along with cpu.Laptop Specs ...
uxserx-bw's user avatar
  • 666
2 votes
0 answers
94 views

How can I insert "blend_filename" into the output node?

One thing I often do is rendering via CLI, and I like to choose EXR format to have 32bit files ready for archive. I also like to have blender saving the jpg preview to quickly see it in OS filebrowser....
Lsscpp's user avatar
  • 27
2 votes
0 answers
580 views

Pipe the render output via command line interface

How can I pipe the render output via command line interface? I mean normally we are rendering and saving the render output as a PNG image file with this command: ...
mertyildiran's user avatar
2 votes
0 answers
245 views

Run a python script before console

When I launch blender with -P and --python-console together like this ...
Giang Lê's user avatar
2 votes
0 answers
844 views

How to force GPU rendering using SSH command in Windows?

I have two Windows 10 computers in the same network. I installed OpenSSH and can remotely connect from one computer from another. I have a blend file that is set to render by GPU. If I use ssh to log ...
sfcheung's user avatar
  • 121
2 votes
0 answers
61 views

When I run Blender headless I do not get proper beveling if I unlink the object

When I use this code in Blender I get what I want. When I run from the command line the result is not beveled like I expect ...
n8CodeGuru's user avatar
2 votes
0 answers
260 views

knife_project in --background

I like to use the function knife_project() in a command line : blender.exe --background --python ... but bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) isn't avaible. I try to use ...
JF Innorev's user avatar
2 votes
0 answers
517 views

Drivers not working when running blender in the background from command line

I am trying to animate a Blender file from the command line that is using a couple of Python functions for Drivers. However, the command gives the following error, and consequently does not perform ...
BrentJM's user avatar
  • 21
2 votes
0 answers
394 views

Script has no effect but Python console do (Blender 2.72b)

I am writting a script to import a 2D DXF and turn it into 3D. I have to convert curves into meshes. I manage to do it in Python console but the same Python code in a script has no effect (no errors ...
liquidus88's user avatar
1 vote
0 answers
29 views

Multi files rendering with windows script command dont work

I have a recent problem that prevents me from using windows scripts for render queue on my desktop workstation. The commands work, but the only problem is that it doesn't chain the next command to ...
Pomess's user avatar
  • 431
1 vote
0 answers
49 views

Taming big bad Blender

How big is Blender lite and headless (uncompressed) on Linux? Blender 3.5.1 uncompressed is roughly 1250 MB. I can delete directories like addons, Eevee engine, built-in world shaders/EXRs, and still ...
chhdgxhuc's user avatar
1 vote
0 answers
47 views

ID user decrement error raised in the console but has no actual effect on Blender. What's the cause of that?

By displaying the property I am getting this error by editing the property or simple scrolling around in the node editor. So maybe something with the layout or UI? ERROR (bke.lib_id): C:\Users\...
Erasers45-Studios's user avatar
1 vote
1 answer
35 views

Passing commands to blender with GUI open

is there a way to pass python commands to blender with the GUI visible? I have a simulator made in Matlab where measurements can be changed. When one of these measurements change I want the script to ...
Robert's user avatar
  • 11
1 vote
0 answers
71 views

Blender only takes first value from Arduino and sensors

I am currently working on a 3D model of an arm. Therefore I get data from 2 sensors with a Arduino and in my Arduino IDE Serial Monitor the data changes as I move the sensor. However, in Blender I ...
Geblendet's user avatar
1 vote
0 answers
95 views

Blender CLI does not work when blender is installed through Windows Store

In order to have a blender version manager I installed blender through the Windows store. When you install through the windows store it seems that they store the file in ...
Joel's user avatar
  • 11
1 vote
0 answers
180 views

How to disable all addons while using blender with --background command line option?

I found the commandline parameter --addons. But when I leave the parameter value empty it does not have any effect. Blender still loads all addons. Is it possible ...
Stephan Ahlf's user avatar
1 vote
0 answers
88 views

How to do parametrized rendering (replacing text/image inputs dynamically before render)

I am currently generating a dynamic blender file with 2 text and 1 image objects that should be replaced with custom text/image inputs. I currently got the CLI command and placement of text/image ...
smbl's user avatar
  • 111
1 vote
0 answers
54 views

Programmatically retrieve available file extension/format options

So as per the documentation, you can override the file extension/type setting for the Blender CLI: https://docs.blender.org/manual/en/latest/advanced/command_line/arguments.html#format-options Set ...
S. Magnusson's user avatar
  • 1,503
1 vote
0 answers
361 views

writing "print" statements in Blender console

I know and use the great script from Codemanx from which you can start python script in the Blender-console and you would see print statements in the Blender-console. Unfortunately it looks like this ...
Chris's user avatar
  • 59.9k
1 vote
0 answers
130 views

What's the proper way to use mesh operators in python when running blender from the command line?

I need to do a loop cut on a mesh I've generated, so I found some code that works when I run Blender normally then the script. The catch is, I need it to work when I launch Blender from the command ...
ioflow's user avatar
  • 11
1 vote
0 answers
454 views

How to get return values when I run blender script from command line?

I've got these project structure: data.blend: Contains object and used by script.py script.py: Does some calculation with data.blend and return some_value ...
Petr's user avatar
  • 21
1 vote
1 answer
314 views

Changing a frame range in blender file via command line

For farm rendering, I need to copy my blend file multiple times and change the frame FROM and TO in each of them via script. I try to create the following python file (with 123 as example) MyFile.py: <...
Laurent Crivello's user avatar
1 vote
1 answer
159 views

Rendering with a different texture filename using texture node without manually changing filename each time

Rendering with a different texture filename using the texture node without manually changing the filename each time. I have several different texture files that i want to render out using the same ...
Rick T's user avatar
  • 4,441
1 vote
1 answer
566 views

Issues running Blender from the command line despite setting up environmental variables

I have become interested in running Blender from the command line (Windows) to make my workflow more efficient. I also want to be able to run it directly without pointing Windows to my directory each ...
Carl Churchill's user avatar
1 vote
0 answers
179 views

Composite nodes being ignored when rendering from command line

I am trying to render an animation using cycles from the command line but my composite nodes are being ignored. The images look ok, just the denoising and glare are missing. In blender on my other ...
Yeet's user avatar
  • 11
1 vote
0 answers
515 views

How to Copy Python Command (with python)

I would like to copy the python command from operators in edit mode, but the "Copy Python Command" is disabled Is there any way to copy the python command from these operators that don't ...
RodrigoGama's user avatar
1 vote
0 answers
389 views

How to edit blender file parameters + settings from command line or python?

Note: This is not a duplicate of this question: How can I run blender from command line or a python script without opening a GUI? That question only addresses rendering, not modifying parameters in a ...
Hmm's user avatar
  • 739
1 vote
0 answers
164 views

Render Passes File Output in Headless Mode

Here is the blender manual on command line rendering: https://docs.blender.org/manual/en/latest/advanced/command_line/render.html I am having an issue in blender where blender hangs on rendering in UI ...
DrIgnatiusCole's user avatar
1 vote
1 answer
3k views

ModuleNotFoundError: No module named 'bpy'

I am attempting to use blender from the command line including bpy functions using https://pypi.org/project/bpy/ I have completed a pip installation and have had no errors or warnings, however when I ...
MattC1990's user avatar