Linked Questions
10 questions linked to/from Set active object with python
38
votes
2
answers
14k
views
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 ...
34
votes
4
answers
6k
views
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 ...
28
votes
1
answer
30k
views
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
bpy.context.scene.objects.active = some_object
This is ...
11
votes
1
answer
4k
views
Run an edit-mode operator on every object in the scene
I want to untriangulate every object in my scene with this script:
...
10
votes
3
answers
3k
views
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.
...
1
vote
1
answer
2k
views
Python- problem with "bpy.data.objects['anyobject'].select=True "
What happens exactly, is that after duplicating an object, then deselecting all selected objects, using:
...
0
votes
2
answers
2k
views
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 ...
0
votes
1
answer
93
views
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 ...
0
votes
0
answers
686
views
0
votes
1
answer
474
views
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.
`...