Blender Python Examples
Blender Python Generate 50 cubes at random positions.
Generate cubes that follow a sin curve.
import bpy from random import randint for i in range(50): bpy.ops.mesh.primitive_cube_add( location = [randint(-10, 10) for axis in 'xyz'] )
Generate cubes that follow a sin curve.
import bpy from math import sin for i in range(50): x, y, z = 0, i, sin( i ) bpy.ops.mesh.primitive_cube_add( location = [ x, y, z ] )
Comments
Post a Comment