How can I set the origin to the end of a mesh before adding it?
For the moment I'm struggling with the overhead of calculating the center of each object's appropriate axis in order to get it properly located e.g. [{'coordinates': [100/2, 0, 0]}]
. It would be much more understandable if I could just set the origin to e.g. Axis "X" and leave the coordinates as is.
import bpy
input_mwe = [{'coordinates': [0, 0, 0], 'scale': [100, 18, 18]}]
def create():
for room in input_mwe:
bpy.ops.mesh.primitive_cube_add(size=1, location=room["coordinates"], scale=room["scale"])
create()
A somehow similar problem is discussed here
bmesh
to create object $\endgroup$