Skip to main content

All Questions

Tagged with
22 votes
5 answers
33k 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 ...
Zéiksz's user avatar
  • 1,979
22 votes
2 answers
14k views

How to add empty object not using bpy.ops?

How to add an empty object with python using bpy and not using any ops? My code so far is doing this: ...
piotao's user avatar
  • 1,407
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
17 votes
3 answers
14k views

Align Object to Vector using python

I am trying to rotate an object using python, inline with a vector which gives me the direction I want (based on the difference between the last two coordinates of the curve I generated). I therefore ...
Batwam's user avatar
  • 325
16 votes
3 answers
41k views

How do you get an object's position and rotation through script?

I'm working on a project that requires me to get some of the position and rotation values to give to an Arduino via pyserial, but after sifting through the Blender documentation I can't find how to ...
Carrot M's user avatar
  • 163
13 votes
1 answer
9k views

How can I separate a single object file into multiple objects based on closed geometry?

Let's say you have a single obj with a number of separate closed 3D geometries in it. For example's sake, imagine you have an obj called neighborhoodfirehydrants.obj...
Danielle's user avatar
  • 131
12 votes
2 answers
31k views

How to rotate an object in Blender 2.74 using python script

I wanna rotate an object with this code below: ...
Jimmy's user avatar
  • 421
12 votes
2 answers
29k views

Import 3D XML in Blender or convert it with another tool

I would like to find a way to import 3D XML (zipped file with XML Data and textures) files into Blender or find a workaround without using 3dvia, or AutoDesk to convert it. I know there is a python ...
Abel's user avatar
  • 562
11 votes
5 answers
11k views

Batch rename objects with number sequence?

Is there a way to batch rename objects in a sequence similar to: object1, object2, object3...? Where 'object' would be any custom name? I found the batch rename datablocks script and it was really ...
Animatoring's user avatar
  • 1,440
10 votes
1 answer
16k views

Adding Named Objects in Blender with Python API

Motivation: I would like to add multiple empties with sequential, but meaningful, names using the Python API with Blender. Issue: I cannot name the objects as I add them. Question: What can I add to ...
PhDeadlift's user avatar
10 votes
3 answers
2k views

How do I Create a script for geometry I create?

I was wondering, is there a possible way of selecting an object I create in blender and generating python code from it, so I am able to generate the object via code? I was wanting to do this for ...
Starius's user avatar
  • 1,114
10 votes
2 answers
7k views

Changing object origin to arbitrary point without origin_set()?

Is there a way to change the origin of an object to an arbitrary point (via scripting) without using the operator origin_set()? I.e., isn't there a method or property on the object to do this? I ...
Jabberwock's user avatar
10 votes
3 answers
8k views

Execute function on object property change

I'm searching an equivalent to the observer design pattern. I want to execute a script function every time an object position changes. To achieve this there might be some options directly in blender ...
user avatar
8 votes
2 answers
11k views

How to get the collection an object belongs to?

I can access objects belonging to a collection like so: objects_in_collection = bpy.data.collections["My_Collection"].objects How can I access the collection a ...
coCoKNIght's user avatar
8 votes
3 answers
5k views

Is it possible to compare 2 meshes for the complementarity of their respective surfaces?

Is there a way in Blender to compare two pieces of mesh or two meshes to its similarity? Maybe with some script or an addon. What I mean: there is a stone or brick broken into half for example: This ...
Stan von Zarovich's user avatar

15 30 50 per page
1
2 3 4 5
17