Skip to content

Instantly share code, notes, and snippets.

@matdombrock
Last active February 10, 2016 19:54
Show Gist options
  • Save matdombrock/1f20bffbad91a302e7f7 to your computer and use it in GitHub Desktop.
Save matdombrock/1f20bffbad91a302e7f7 to your computer and use it in GitHub Desktop.
blender, python spiraling stairs
#Select the object you want as your step and choose the correct distance intervals on the last line
#your selected object should have a pivot point offset equal to the inner radius of your stair set spiral
import bpy
import mathutils
for x in range(0,100):#How many steps
bpy.ops.object.duplicate()
for obj in bpy.context.selected_objects:
obj.name = "A"+str(x)
obj.delta_location += mathutils.Vector((0, 0, 1))#distance between steps
rot = x*0.2
bpy.context.scene.objects.active.rotation_euler = (0, 0, rot)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment