Skip to content

Instantly share code, notes, and snippets.

@brettkromkamp
Created December 2, 2023 09:51
Show Gist options
  • Save brettkromkamp/fdfbd520822e6dccb9d7617a2fd6b5be to your computer and use it in GitHub Desktop.
Save brettkromkamp/fdfbd520822e6dccb9d7617a2fd6b5be to your computer and use it in GitHub Desktop.
Distribute objects in a cube with Blender Python
import bpy
offset = 3
size = 10
for x in range(size):
for y in range(size):
for z in range(size):
bpy.ops.mesh.primitive_cube_add(location=(x * offset, y * offset, z * offset))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment