All Questions
68
questions
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 ...
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 ...
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 ...
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 ...
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 ...
3
votes
2
answers
2k
views
Copying an object with python without actually creating a new object
I ran across this script on another forum and would like to implement it. However, I'm running into a major bottle neck (performance-wise) when it gets to linking the new objects back to the scene ...
3
votes
2
answers
3k
views
Place objects on mesh using snap with Python script
I'd like to place objects on a mesh using snap with a python script in Blender 2.79, preferably on places where the gradient (steepness) of the mesh (terrain) is not too steep.
From the snap ...
5
votes
1
answer
3k
views
Generate random ellipsoids
I have a problem to generate random ellipsoids inside a cubic space.
This is the script I wrote:
...
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:
...
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...
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 ...
5
votes
1
answer
1k
views
randomly distribute objects over a plane
I have a number of different objects (e.g. cube, cylinder, monkey, furniture, etc) which I would like to distribute randomly over a plane/surface (the floor in this case) without having any ...
2
votes
1
answer
5k
views
Looping over hierarchies of objects with Python
Today I'm able to select all parameters that I need. But select a object it's pretty simple, using name it's ok.
But I use a very complex hierarchy in blender. As you can see just below:
Thereby I ...
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 ...
5
votes
2
answers
8k
views
How to move an object's origin to the center of its bounding box?
What I want:
I want to set the origin of an object to the center of its bounding box using a python command.
What I've tried:
...