Advertisement
Guest User

Untitled

a guest
Oct 5th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. # Add a Cube
  2. # Add two Shape Keys to it (Basis, Key 1)
  3. # Then run this script...
  4. import bpy
  5. a = bpy.data.actions.new('Action')
  6. f = a.fcurves.new(data_path='key_blocks["Key 1"].value')
  7. f.keyframe_points.add(2)
  8. f.keyframe_points.foreach_set('co', [0, 0, 100, 1])
  9. f.update()
  10. o = bpy.data.objects['Cube']
  11. o.data.shape_keys.animation_data_create()
  12. o.data.shape_keys.animation_data.action = a
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement