Linked Questions

38 votes
2 answers

Python performance with Blender operators

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: if ...
Salvatore's user avatar
  • 757
34 votes
4 answers

Why avoid bpy.ops?

Simple and maybe stupid question: I was reading this lot of time, that "you should avoid using bpy.ops, or "instead of ...
Zéiksz's user avatar
  • 1,979
28 votes
1 answer

Blender 2.8 API, python, set active object

I'm trying to amend an addon that I made for Blender 2.7X to work with Blender 2.80. The problem is with = some_object This is ...
Georges D's user avatar
  • 5,042
11 votes
1 answer

Run an edit-mode operator on every object in the scene

I want to untriangulate every object in my scene with this script: ...
JamesNZ's user avatar
  • 233
10 votes
3 answers

What's the difference among object, active_object, and selected_objects?

I am wondering if following statements are true: active_object is always identical to object. ...
TheBusyTypist's user avatar
1 vote
1 answer

Python- problem with "['anyobject'].select=True "

What happens exactly, is that after duplicating an object, then deselecting all selected objects, using: ...
user8844's user avatar
0 votes
2 answers

How to assign a new material for each object using Python?

Is it possible to assign a new Material(Principled BSDF shader) to each mesh or a selection of meshes in my scene using Python? The script should use the individual mesh name to name the material and ...
user62799's user avatar
0 votes
1 answer

How to apply a bevel to a curve using python?

In a previous version of blender I had script that applied a bevel to a curve, but now cannot get it to work in 2.92. or above. I want to apply the bevel to an object referenced by the variable ...
John's user avatar
  • 1
0 votes
0 answers

KeyError: 'bpy_prop_collection[key]: key "m_avg_Pelvis" not found' but that key actually exist

Nicholas Jela's user avatar
0 votes
1 answer

Unable to deselect newly added object with Python (Change red selection to orange) - Blender 2.8

I am trying to add an object using from_pydata but am unable to deselect the added item - which is currently outlined in red and then select it so it is outlined in orange - and enter Edit mode. `...
KK_'s user avatar
  • 48