Last active
February 10, 2016 19:54
-
-
Save matdombrock/1f20bffbad91a302e7f7 to your computer and use it in GitHub Desktop.
blender, python spiraling stairs
This file contains hidden or 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
#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