Linked Questions

5 votes
2 answers
3k views

Object creation slows over time [duplicate]

I know that this has been asked before, but the answers that others have received did not help me much. When creating objects through Python, using bpy.ops.mesh.primitive_cube_add() there is an ...
  • 1,779
18 votes
2 answers
52k views

Set active object with python

I want something along the following lines: ...
19 votes
4 answers
24k 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 ...
20 votes
4 answers
28k views

How to join objects with Python?

I try to do this: bpy.ops.object.select_all() bpy.ops.object.join() in my script. It selects all the stuff like CtrlA but fails on ...
  • 1,919
33 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 ...
  • 1,919
12 votes
3 answers
6k views

Duplicating non primitive mesh with Python

I've created a mesh I want to duplicate using python with specifications for the new duplicate's coordinates. How do I do that?
  • 360
12 votes
4 answers
13k views

What is the replacement for scene.update()?

It seems the following is no longer available in blender 2.8 api bpy.context.scene.update() How do we update objects in the scene that have been changed by the ...
  • 123
8 votes
4 answers
6k views

Blender becomes very slow with large amount of objects sharing mesh data

In my script I am importing a large amount of objects (+2500) but sharing the mesh data from one single primitive. While this has taken care of importing speed, it completely slows blender down. ...
17 votes
1 answer
10k views

How do I create a new object using Python in Blender 2.80?

As part of an existing add-on, I'm trying to create an object and add it to the scene using Python. I followed a Blender Cookbook tutorial found here: Three ways to create objects. I use the following ...
  • 1,952
11 votes
2 answers
3k views

Rotation around the cursor with low-level python (no bpy.ops)

In order to optimize my script, I would need some help to perform a rotation around the cursor (see Rotate object around cursor with Python) With low-level python, that means, without ...
  • 737
8 votes
3 answers
3k views

PythonScript to load data as colored point-cloud

Background I want to render 3D points with color information for scientific visualization. I have several hundred thousands of points up to 2 million. For each point I have [xyz] coordinates and two ...
5 votes
3 answers
4k views

How can I create many objects quickly?

In my application I have to create up to some 1000 tetraders (objects with 4 vertices, 4 faces, 6 edges). As input I get only the absolute vertex coordinates for each tetraeder. From the mathematical ...
5 votes
1 answer
3k views

Setting the origin for each object to geometry

Blender 2.83 In python I can create all of the features that I want in my world, but when I go to the world, each thing has the same location data. I can click on each and click set origin to geometry,...
0 votes
1 answer
3k views

How to remove all unused material slots from all objects?

Is it possible to remove all unused material slots from all objects? I am aware of "Remove Unused Slots" option when one object is selected ("Remove Unused Slots" affects only the ...
  • 568
3 votes
3 answers
3k views

How can I delete keyframes and animation data for all selected objects?

I am trying to do as the title suggests: remove all keyframes and animation data from all selected objects. I am just starting out with Python and add-on development so this has proven to be a ...
  • 1,361

15 30 50 per page
1
2 3 4 5