Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Questions tagged [python]
Python is an object-oriented programming language. In Blender, it is used as a general purpose scripting language and to create add-ons to extend Blender's functionality.
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 ...
Jun 25, 2013 at 10:48
I'm trying to debug a Python script by placing a
print("foo=" + foo) statement in my code.
But where does the output appear?
It doesn't appear on the Python ...
Jan 11, 2014 at 0:19
I am trying to create an urban open-world environment in Blender that would be about one square kilometre in size. To avoid having to model hundred of individual buildings, I am looking for a way to ...
Apr 13, 2014 at 12:53
Is there an interface or API that allows using Blender as a tool for mathematical and scientific visualization? It should allow Blender to read in data (a la gnuplot or matlab, perhaps using scipy) ...
Jun 19, 2013 at 19:46
I'm currently developing a script for Blender to handle Mesh Frequency Decomposition.
The script is nearly complete, but i need one more thing: The SciPy library to compute eigenvalues and ...
Dec 4, 2013 at 9:37
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. ...
Feb 6, 2014 at 10:31
I was watching this video on making a custom UI tab using Python, and in the line
from bpy.types import Menu, Panel, UIList, I see the names of objects that look ...
Jul 6, 2016 at 9:32
How can I completely remove an object (for example a camera) using python scripting?
Using something like:
Does not work, since it ...
Mar 17, 2015 at 12:17
I keep on getting context errors in the Blender Python API.
I don't understand the issue of the context in the API, how do I know which is the correct context?
Jan 8, 2014 at 20:13
As shown below, I have 2 nested spheres, each with a different material (inner = "1", outer = "2"). Ultimately, I need to select the inner sphere (material "1") via ...
Sep 15, 2015 at 21:50
I'm trying to write an addon to customize the trackpad panning, zoomimg, and rotating gestures, but can't find a way to read the actual trackpad parameters for position and so on. The properties in ...
Jul 13, 2013 at 6:05
How can I define the different properties of an Cycles/Eevee material? Such things as glossy, glass, diffuse, RGB-color, emissive via python scripting?
Jan 19, 2015 at 13:29
Blender comes with Python, and includes a stand-alone Python executable.
However pip is not part of the official Python distribution so it needs to be added separately.
How do you setup ...
Jun 16, 2016 at 7:59
How can I assign a new material to an object in the scene via Python?
Jan 19, 2015 at 12:54
In my script, I have
for loop over many cube objects (~1000) and the treatment is very slow. Looking more in details, I notice that in the same amount of loops:
Feb 26, 2014 at 21:38
What's the best way to get the full directory of the current Blender file in Python?
It should be cross-platform.
Feb 7, 2014 at 11:37
Can I run a python script step by step with normal blender, a build, external software or an addon?
I'm developing a script (town generator) and I want to to execute the code step by step like a ...
Aug 22, 2013 at 8:53
Simple and maybe stupid question:
I was reading this lot of time, that
"you should avoid using
bpy.ops, or "instead of ...
Sep 12, 2013 at 14:08
I really love the look of Blender's built-in GUI, and would potentially like to use these tools in some of my other Python applications. As I understand it, Blender created all of these tools from ...
Jun 21, 2013 at 21:31
I've seen the functions called poll and invoke used in scripts. I'm curious what these are for and when they are called.
Dec 1, 2014 at 18:45
I want to read the vertex
x and y coordinates with a script or a function.
How can I do that?
appears to have ...
Jun 23, 2013 at 17:06
I'm currently trying to extract textures from a binary file, and ideally I'd like to save each texture to a file or embed in the
.blend file. However, before saving ...
Jun 5, 2013 at 14:46
bpy.data.objects['Cube'].select = True
bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']
don't work in Blender 2.8, they did in 2....
Feb 25, 2019 at 8:10
What's the best/fastest way to construct a list of selected vertices for a mesh object in python?
I want to avoid iterating over every vertex in the mesh if possible, since that seems like a really ...
Jun 27, 2013 at 1:28
I'm trying to amend an addon that I made for Blender 2.7X to work with Blender 2.80.
The problem is with
bpy.context.scene.objects.active = some_object
This is ...
Dec 19, 2018 at 14:56
Is it possible to use different icons other than the default set and how?
Jun 12, 2015 at 9:09
Creating a sphere using the points defined by Spherical Fibonacci Mapping. For the most part it is easy to "skin" by using two consecutive fibonacci numbers as steps to loop on the index. And get ...
Aug 13, 2016 at 12:09
is it possible to trigger this kind of menu:
in the property panel when I press a hotkey over a button/input field? I want to specifically,when the user presses a specific hotkey when over an input ...
Dec 10, 2014 at 16:36
I am trying to add cubes to my scene. I'm sure there are lots of ways to get a cube into the scene (but for the purposes of this question, I have no idea what they are) - Are there any ways to add a ...
Jan 1, 2015 at 0:53
I'm making an python script which create a lot of object and this could take a lot of time. My question is how to show to the user of my script, the "progression" of the script?
For now I print an ...
Oct 7, 2013 at 11:55
How can I make a Interface which is similar to the Material-Interface within Blender via Python?
It should look like these. Could you guide me to the right direction? I don't think it's in bpy.ops, ...
May 5, 2015 at 16:31
Blender 2.8 produces the following error whilst multiplying a combination of matrices and vectors
Jan 21, 2019 at 22:08
I'm currently twiddling with an old addon and insert some print statements for debugging. Currently I'm restarting Blender each time to see the new messages. Is there a way to 'refresh' an already ...
Sep 3, 2013 at 20:25
I have seen this question now many times and every question here and on other forum points to build blender as python module experimental tutorial by ideaman42. Now sadly a lot of answers are invalid ...
Aug 29, 2018 at 16:40
How to know which object is using a material.
I know that a material is used 4 time -> picture under:
I'm searching a solution with python and I'm blocked here :
Nov 11, 2013 at 12:54
I'm looking for an efficient way to get the current
.blend file name, in a python script.
I know how to get its path, with ...
Aug 24, 2013 at 15:10
I have edited a script that creates some nodes, but the only problem is, it always created a new material. I want it to either add the nodes on the existing material, or a pre-defined material. Here ...
Dec 18, 2013 at 22:04
The following question might've been asked several times, but I've found no satisfactory answer.
How can I show progress of background task in Blender UI?
I have a ...
Jun 14, 2013 at 9:45
I'm trying to use Python to place a camera. I know the camera's location, and the forward and up vectors for the camera (i.e. the direction it's pointing and its orientation). How do I do this?
Dec 1, 2013 at 16:15
I am trying to set a cursor location and pivot point with
bpy.types.SpaceView3D.cursor_location = (0.0, 0.0, 0.0)
Dec 7, 2013 at 23:02
I'm trying to set up some automated render servers on EC2 using their GPU instance type (g2.2xlarge). I'm running blender in the background with a python script that renders the image I want and saves ...
Dec 4, 2013 at 5:05
Say we want to navigate a tree structure without knowing all the data ahead of time, is it possible to do this in Blender?
For example, a menu which dynamically loaded a directory hierarchy from the ...
Jun 4, 2018 at 17:42
How do I convert from object-space to world-space?
I suspect it is:
vert_os = obj.vertices[foo]
vert_ws = vert_os.getPositionFromMatrix(obj.matrixWorld)
Jan 10, 2014 at 13:41
I am new to blender, but not python, and have been asked to create a user-input dependent, stylized animation of a protein network I am working with:
text document >> information processed by python-...
Jul 8, 2015 at 12:30
The question is where I can reliably find the information on which python version is bundled with a certain Blender release (like 2.72b at the moment)?
I need to find the major and minor version ...
Nov 4, 2014 at 17:54
I'd like to know if there's a way/add-on to convert curves to Grease Pencil strokes? I know you can convert in the other direction, but I can't find anything to create Grease Pencil strokes from ...
Aug 21, 2015 at 14:02
Render Result exists in
bpy.data.images["Render Result"] but it contains no data.
Also bpy.data.images["Render Result"].size ...
Aug 6, 2013 at 20:46
Which modules are guaranteed to be included in Blender's custom Python build?
Jun 16, 2013 at 21:29
For some reason, sometimes error messages encountered while scripting are not printed in the info panel, only the message ...
Dec 9, 2013 at 8:51
I try to do this:
in my script. It selects all the stuff like CtrlA but fails on ...
Jul 12, 2014 at 13:01
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only