Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Add a Cube
- # Add two Shape Keys to it (Basis, Key 1)
- # Then run this script...
- import bpy
- a = bpy.data.actions.new('Action')
- f = a.fcurves.new(data_path='key_blocks["Key 1"].value')
- f.keyframe_points.add(2)
- f.keyframe_points.foreach_set('co', [0, 0, 100, 1])
- f.update()
- o = bpy.data.objects['Cube']
- o.data.shape_keys.animation_data_create()
- o.data.shape_keys.animation_data.action = a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement