Created
December 2, 2023 09:51
-
-
Save brettkromkamp/fdfbd520822e6dccb9d7617a2fd6b5be to your computer and use it in GitHub Desktop.
Distribute objects in a cube with Blender Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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