Linked Questions

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
0 votes
1 answer
74 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
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
1 answer
375 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
234 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
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
1 vote
0 answers
858 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
812 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
1 vote
0 answers
293 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,206
0 votes
0 answers
132 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
0 answers
911 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
0 votes
0 answers
159 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
117 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
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

15 30 50 per page