Linked Questions

0 votes
1 answer
1k views

Running a python script with arguments in blender from terminal [duplicate]

I want to run a python script for a blend file within blender and I want to give the command from terminal. Blender has this option as follows: ...
Nagabhushan S N's user avatar
0 votes
0 answers
193 views

How can I execute a Python script that utilizes the Blender API outside of the built-in Blender terminal? [duplicate]

I am trying to create a script that converts an OBJ file into an FBX file in Blender 2.78: ...
ack's user avatar
  • 143
0 votes
0 answers
116 views

How to run blender python script with args? [duplicate]

I have a python script that takes command-line args. I'm using it to create some blender objects. I'll run it from the command line (actually from a script on a server). I run it like this: ...
GaryO's user avatar
  • 545
0 votes
0 answers
48 views

Pass values from python script to Blender and automate render(mp4) creation [duplicate]

I have a project in Blender that provokes a shape to move in certain ways based on two values (currently I manually change the values in the Python script in Blender and manually click to render to an ...
Garrett's user avatar
  • 21
21 votes
1 answer
159k views

open .stl file with blender [duplicate]

I need to open .stl files with blender, without importing them! In the properties of my .stl file, blender is set as "open with", but when I double click on the file it just opens blender as my ...
Alex Husarenko's user avatar
5 votes
1 answer
7k views

How to prevent memory leakage in Blender?

I have to load lots of objects/meshes(50k) in Blender and render them for which I have written a Python script. My meshes have lots of vertices/faces (in the range of ~[10k, 70k]). I noticed that ...
Amir's user avatar
  • 3,064
5 votes
1 answer
6k views

Print all commands in the Info view?

The Info view doesn't show every command (scripts) which I actioned. Example open new file, reload file, import, export... How to show them?
buonnguqua's user avatar
1 vote
1 answer
2k views

How to output multiple images from Blender's compositor with Python?

I know how to render one image via Python and get an output with Blender's compositor. What if I need it to render 100 images for me with numerical names e.g: img_1...
cxnt 's user avatar
  • 397
2 votes
2 answers
1k views

Blender command line cli : create a new .blend from a normal 3d model like .obj, .fbx..... [[ FROM .OBJ -->> TO .BLEND ]] without a desktop

CONTEXT : I'm building a website where users can upload many files. [WEB SERVER, no gpu] WHAT I WANT : that an uploaded .obj => render an image preview as a .png WHY : to manage a library of ...
Jintor's user avatar
  • 141
0 votes
2 answers
1k views

What is best workflow for having a scene with multiple light setups?

I have a scene with interior room design and I created several light setups for it (daylight from windows, powerful electric light from the ceiling, moody evening light from floor lamps). What would ...
Arek's user avatar
  • 307
3 votes
2 answers
2k views

Sequentially importing .obj files becomes drastically slow very quickly

I have written a very straight-forward script that imports many obj files one-by-one and renders them. The imported meshes have ~10k to ~120k vertices. After rendering, I completely remove the ...
Amir's user avatar
  • 3,064
1 vote
1 answer
2k views

How to automate the conversion of objects generated by Python script to fbx or to obj?

I've several Python scripts (around 6000 scripts). Each of them generates 3D objects. I want to find a way to export these generated objects to either fbx or obj files. Is there a way to do it using ...
Kask909's user avatar
  • 31
2 votes
1 answer
2k views

Cannot pass arguments to Python script when executed by blender.exe

On Windows, I'm trying to have blender.exe execute a Python script that internally uses the argparse module for the arguments handling. What I'm struggling with is ...
ackh's user avatar
  • 318
3 votes
1 answer
938 views

Is there any way to change the number of rendering samples using command-line?

I am sending my .blends to another remote machine for rendering, and then I render them using command-line. Sometimes, the size of the .blends become as high as ...
CoolCoder's user avatar
  • 626
1 vote
1 answer
2k views

Is it possible to assign an active camera through command line rendering?

I'm wondering if there's a way of telling blender which camera to use as the active one when rendering from the command line. I can't seem to find any documentation about this. Also there is no ...
Delagone's user avatar
  • 2,058
0 votes
1 answer
1k views

Create a Python program that creates a new Blender file and edits the scene

Like the title says, I want to create a Python (or Node.js program, although I think Python would be a lot better for this) that creates a new Blender file and is able to change the colour of the ...
Jacob's user avatar
  • 13
3 votes
1 answer
779 views

Using argparse in script yeilds memory error

I want to get blender to work with argparse. I found the following implementation in blender here and tried to sum it down to this: ...
GuySoft's user avatar
  • 131
1 vote
1 answer
2k views

How to delete unwanted/unused parts of texture?

I've used photogrammetry to scan two objects. The texture that was generated has tiny patches of unconnected faces of both objects all mixed up together. These patches make up the texture for both of ...
Lanky Panky's user avatar
1 vote
2 answers
938 views

sound_bake in command line script

I'm making an audio visualizer which I want to render from the command line. Unfortunately the bpy.ops.graph.sound_bake() function seems only to work from the GUI. ...
Roland's user avatar
  • 33
1 vote
1 answer
2k views

bpy.context.space_data.text throwing error from command line

I'm new to Blender and Python, but have programming experience. I'm writing a script that iterates through all the .stl files in the current directory (current being where the script is), does a few ...
Ryan Ashley's user avatar
3 votes
2 answers
523 views

Modify a blend file via console outside of GUI

I have built a little 'smart' robot using a Raspberry Pi and Arduino. Currently it can move around, sense obstacles, determine if it can pass, etc. My biggest problem so far is that it is completely "...
Mungoid's user avatar
  • 185
0 votes
2 answers
1k views

How to remove unreferenced UV Coordinates from a Texture

I have a textured mesh that I have bisected and the mesh now only contains the parts that I want (the rest has been deleted). The result is, in my limited understanding, that the parts of the mesh ...
Fiddy Bux's user avatar
  • 201
2 votes
1 answer
778 views

How do I render only part of an image via the command line?

I know that it is possible to render from the command line: https://docs.blender.org/manual/en/dev/render/workflows/command_line.html I'm tring to make it possible to render a single image on ...
man zet's user avatar
  • 123
2 votes
1 answer
694 views

command-line export data to php

I need to open an STL file with Blender, run a script that finds it's dimensions and send them to a php page. All of this should essentially be done through command line or a python script. So far I'...
Alex Husarenko's user avatar
3 votes
1 answer
500 views

How to render an image with edits based on custom input, from the command-line?

I would like to write a webservice, which renders images using blender using the passed pose of the camera. This means I need to start blender within python, pass the scene, place the camera and ...
mojovski's user avatar
  • 131
2 votes
1 answer
751 views

How do I delete/remove/replace an image using a script?

I have a script that inserts three images (Image1, Image2, Image3) into a blend and then renders the video. It works great. The images show up exactly when and where they are supposed to. The problem ...
mcgeo52's user avatar
  • 121
0 votes
0 answers
888 views

Debug python script inside Blender with passing arguments

I'm trying to debug a python script in which passing arguments is required. Since I want to debug, using -b flag is not an option (otherwise there is no problem ...
AvivSham's user avatar
  • 185
1 vote
0 answers
837 views

Create mesh in scene with modifiers, export and save it, then load later with modifiers preserved

I aim to do the following using Blender 2.82a and python: (a) create a mesh in a scene with modifiers and save it, then (b) in another python script, load that same mesh with the same modifiers ...
ComputerScientist's user avatar
1 vote
0 answers
801 views

How to pass parameter(s) to a Python script via the command line and also render in the same command?

I am trying to render a scene where I run a script with given parameters and then render the animation by passing parameters to the blender executable through the command line. Given the following ...
Sam's user avatar
  • 111
0 votes
1 answer
363 views

Particles not rendered using python script

Following this example I added a psys to my scene. I add the cube from the script because for this application I CAN NOT use the GUI, so adding this snippet: ...
SIMONE BENATTI's user avatar
0 votes
1 answer
226 views

How to pass command line arguments through Blender without IndexError thrown?

I am trying to execute my command with two arguments in terminal: blender -b Scripting_Testing.blend -P background_job.py -- 1 2 I have used: ...
pleaseh3lp's user avatar
1 vote
0 answers
283 views

Is it possible to use loop statement via --python-expr in command line?

I have several scenes in a blend file. Sometimes I want to render all scenes with lower resolution, or mute some of the input nodes in the compositor of all the scenes. I can accomplish the above ...
J. SungHoon's user avatar
  • 2,186
0 votes
0 answers
158 views

Render a .blend file in command line

I have a .blend file with some pre-configured lighting, camera,... The script in the file loads an external .stl file and render ...
Minh Nghĩa's user avatar
0 votes
0 answers
129 views

How to query .blend file via command line, or python script, and extract data from it

I need to query the .blend file and extract any type of data from it. Things like: does it have composition enabled? what is the output file and format set by ...
Nisim Joseph's user avatar
0 votes
1 answer
71 views

The import time is increasing gradually over time while trying to automate a rendering process

My goal is to optimize a synthetic dataset program that imports N-number of .glb files, places them randomly, and fixates a camera on the center of all these objects (so it can render an image of ...
Ryan Wagner's user avatar