Skip to main content

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.

22 votes
5 answers
22k views

How to set cursor location, pivot_point in script?

I am trying to set a cursor location and pivot point with bpy.types.SpaceView3D.pivot_point='CURSOR' bpy.types.SpaceView3D.cursor_location = (0.0, 0.0, 0.0) and ...
dimus's user avatar
  • 3,312
22 votes
2 answers
11k views

Blender sets Compute Device (CUDA) but doesn't use it for actual render (on EC2 GPU Instance)

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 ...
Ritwik's user avatar
  • 323
21 votes
4 answers
8k views

Convert Curves to Grease Pencil?

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 ...
Shawn Altorio's user avatar
21 votes
3 answers
14k views

Is it possible to print to the Report window in the Info view?

I wonder if it is currently possible to print or send messages to the Report window in the Info view? this would be quite useful sometimes.
zeffii's user avatar
  • 39.7k
21 votes
6 answers
16k views

How to access Render Result pixels from python script?

Render Result exists in bpy.data.images["Render Result"] but it contains no data. Also bpy.data.images["Render Result"].size[0] ...
Hatoru Hansou's user avatar
21 votes
2 answers
44k views

How to rename selected objects using python?

I want to rename a large number of items. Doing so manually could take quite some time. I want to use python to rename the object. To find out the python command for renaming I renamed an object ...
Vader's user avatar
  • 14.8k
21 votes
2 answers
703 views

Which modules are guaranteed to be present in Blender's Python?

Which modules are guaranteed to be included in Blender's custom Python build?
Forest Katsch's user avatar
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
  • 158k
20 votes
1 answer
11k views

Controling compositor by python

I've been looking at the python code loging of Blender. But in there things get loged as mouse clicks. What i like to do is combine a few images into a larger one using compositor, but i need control ...
user613326's user avatar
20 votes
1 answer
10k views

Finding vertices in a Vertex Group using Blender's Python API

Is there an easy way to get the vertices in a vertex group? The only way I've found is pretty brute-force - e.g., to find the vertices of object obs[i] in group "e"...
Jabberwock's user avatar
20 votes
4 answers
14k views

What programming languages can I use in Blender?

What version of Python does Blender use and are other languages available? Also, does Python work the same in Blender as when you write console applications or when working with Pygame or are there ...
20 votes
2 answers
12k views

How to check if two meshes intersect in python?

I need to check if two meshes intersect or not. At the moment I have some python code to find intersections of world axes aligned bounding boxes, next step would be to implement check for mesh ...
Lissanro Rayen's user avatar
20 votes
4 answers
42k views

How to get Python multiprocessing module working on windows?

I am trying to run a script within Blender that utilizes multiprocessing module. According to documentation it is possible to use it ( see note at the end of "...
elmo's user avatar
  • 732
19 votes
4 answers
28k views

How to make object A a parent of object B via Blender's Python API?

I have two objects each of them hold in a variable. Now I want to parent them so object A is the parent of object B. How can I ...
Miguellissimo's user avatar
19 votes
2 answers
36k views

create mesh then add vertices to it in python

I would like to create a mesh, then interactively add vertices (afterwards, possibly through a loop) to it through python. Is that possible? I can't find enough info from other answers to really get ...
Jono's user avatar
  • 193

15 30 50 per page