Paste Code
Paste Blends
Paste Images
# Blender Generate Shanking Animation Sample Script
# Python hack-a-thon 2010.07
# @nanimosa

import bpy
import random

for i in range(250):
bpy.ops.anim.change_frame(frame=i)
bpy.ops.transform.translate( value=(random.random()-0.5,
random.random()-0.5,
random.random()-0.5), constraint_orientation='GLOBAL')
bpy.ops.anim.keyframe_insert(type=-1)

bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
  1. # Blender Generate Shanking Animation Sample Script
  2. # Python hack-a-thon 2010.07
  3. # @nanimosa
  4.  
  5. import bpy
  6. import random
  7.  
  8. for i in range(250):
  9.     bpy.ops.anim.change_frame(frame=i)
  10.     bpy.ops.transform.translate(   value=(random.random()-0.5,
  11. random.random()-0.5,
  12. random.random()-0.5), constraint_orientation='GLOBAL')
  13.     bpy.ops.anim.keyframe_insert(type=-1)
  14.  
  15. bpy.ops.object.editmode_toggle()
  16. bpy.ops.object.editmode_toggle()
  17.  
go to heaven