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.

19 votes
3 answers
27k views

How do I select specific vertices in blender using python script?

I have created a plane and have applied loop cut and slide twice horizontally and once vertically( using python script). With this done, I intend to select the top two corner vertices using python ...
Gabriel's user avatar
  • 621
19 votes
4 answers
10k views

How can I store and retrieve a custom list in a blend file?

I am trying to create a script that will allow me to generate a list and store it in the blend file. The list starts out blank and then strings get added to the list, resulting in: ...
Ray Mairlot's user avatar
  • 29.3k
19 votes
1 answer
6k views

Using Blender for plotting graphs?

While gnuplot is serviceable and matplotlib is a popular choice for Python developers, I wanted to use Python for plotting some simple graphs (matplotlib had some issues installing on my system, with ...
ideasman42's user avatar
  • 47.6k
19 votes
1 answer
7k views

What do new bpy class naming conventions in Blender 2.80 actually mean?

What are the new class naming conventions in Blender's 2.80 Python API for add-ons? It says here: This constraint applies to the bl_idname of each class (or the ...
Martynas Žiemys's user avatar
18 votes
6 answers
20k views

Rotate objects around their origin along a global axis (scripted) without bpy.ops

I have read so much about Blender rotation in the last two hours that my head is spinning, but I can not understand how to rotate strictly in global coordinates without using ...
uhoh's user avatar
  • 2,667
18 votes
6 answers
19k views

Python - Set material to material slot

I am using the Blender Internal render engine. I have an material slot with no material assigned to it. How can I assign a material to a slot using python? This should work in edit mode as well. ...
Vader's user avatar
  • 14.8k
18 votes
8 answers
3k views

How to find the number of loose parts with Blender's Python API?

I want to find out how many loose parts a mesh has using Python, i.e. write a function that takes a mesh object as an argument and returns an int. So far I haven't found a way to access this ...
Tim Ayres's user avatar
  • 283
18 votes
3 answers
21k views

How to get keyframe data from python?

I am looking for help on how to export armatures and their animations in a custom export script. I wish to have an animation format similar to BVH, i.e. a bunch of ...
rspencer's user avatar
  • 283
18 votes
2 answers
12k views

How to get Blender's version number from Python?

How do I go about programmatically getting the Blender version number? Example: If I am running Blender 2.76, how would I get the version number from the python console?
Greg's user avatar
  • 653
18 votes
2 answers
13k views

How to automatically fit the camera to objects in the view?

I'm using blender to render avatar and avatar accessories on a website, however there is a problem, when a hat, or accessory is made a bit large, the it doesn't fit in the viewport, is there anyway to ...
slixxed's user avatar
  • 183
18 votes
2 answers
6k views

Is it possible to make a modifier with a python addon?

Is it possible to make python addon as a modifier? I just would like to make some deformation modifiers. But I know only python.
mifth's user avatar
  • 2,341
18 votes
1 answer
14k views

How can I use a Python script to get the transformation of an object?

How can I use a Python script to obtain the exact coordinates of an object? I have not been able to find out how to do this in the documentation.
Qu0rk's user avatar
  • 379
18 votes
1 answer
8k views

Proper way to show users error info in the UI for addons [duplicate]

Are there standardized features in the python API for displaying the popup and error message that users typically see in Blender when they're not doing something the right way? Trying to apply a ...
Qutorial's user avatar
  • 3,322
18 votes
3 answers
3k views

Add a custom curve mapping property for an add-on?

Question The title says it all. I want to be able to make this in Blender's UI, and sample it at specific points from an add-on: Problem There is very insufficient documentation on this, and I can't ...
JakeD's user avatar
  • 8,527
18 votes
3 answers
786 views

Select individual hairs with Python

Is it possible to select specific particle hairs or hair keys in Blender with Python? I'm writing a script on Blender 2.73a which involves finding hairs in a system by their index and applying the ...
laymouse's user avatar
  • 181

15 30 50 per page
1
3 4
5
6 7
886