Advertisement
General_101

Chicken Scratch

Aug 26th, 2020
1,647
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.98 KB | None | 0 0
  1. from mathutils import Vector, Quaternion, Matrix, Euler
  2. bpy.context.scene.frame_set(1)
  3. M1 = Matrix.Translation(Vector((0, 0, 0)))
  4. bpy.data.objects['Armature'].pose.bones[0].matrix = M1
  5. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('location')
  6. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('rotation_quaternion')
  7. M2 = Matrix.Translation(Vector((0, 0, 2)))
  8. bpy.data.objects['Armature'].pose.bones[1].matrix = M2
  9. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('location')
  10. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('rotation_quaternion')  
  11. M3 = Matrix.Translation(Vector((0, 2, 4)))
  12. bpy.data.objects['Armature'].pose.bones[2].matrix = M3
  13. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('location')
  14. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('rotation_quaternion')  
  15. bpy.context.scene.frame_set(2)
  16. M1 = Matrix.Translation(Vector((0, 0, 0)))
  17. bpy.data.objects['Armature'].pose.bones[0].matrix = M1
  18. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('location')
  19. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('rotation_quaternion')
  20. M2 = Matrix.Translation(Vector((0, 1, 3)))  
  21. bpy.data.objects['Armature'].pose.bones[1].matrix = M2
  22. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('location')
  23. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('rotation_quaternion')
  24. M3 = Matrix.Translation(Vector((0, 3, 5)))
  25. bpy.data.objects['Armature'].pose.bones[2].matrix = M3
  26. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('location')
  27. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('rotation_quaternion')  
  28. bpy.context.scene.frame_set(3)
  29. M1 = Matrix.Translation(Vector((0, 0, 0)))
  30. bpy.data.objects['Armature'].pose.bones[0].matrix = M1
  31. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('location')
  32. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('rotation_quaternion')
  33. M2 = Matrix.Translation(Vector((0, 2, 4)))  
  34. bpy.data.objects['Armature'].pose.bones[1].matrix = M2
  35. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('location')
  36. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('rotation_quaternion')  
  37. M3 = Matrix.Translation(Vector((0, 4, 6)))
  38. bpy.data.objects['Armature'].pose.bones[2].matrix = M3
  39. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('location')
  40. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('rotation_quaternion')  
  41. bpy.context.scene.frame_set(4)
  42. M1 = Matrix.Translation(Vector((0, 0, 0)))
  43. bpy.data.objects['Armature'].pose.bones[0].matrix = M1
  44. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('location')
  45. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('rotation_quaternion')
  46. M2 = Matrix.Translation(Vector((0, 2, 4)))
  47. bpy.data.objects['Armature'].pose.bones[1].matrix = M2
  48. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('location')
  49. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('rotation_quaternion')  
  50. M3 = Matrix.Translation(Vector((0, 5, 7)))
  51. bpy.data.objects['Armature'].pose.bones[2].matrix = M3
  52. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('location')
  53. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('rotation_quaternion')  
  54. bpy.context.scene.frame_set(5)
  55. M1 = Matrix.Translation(Vector((0, 0, 0)))
  56. bpy.data.objects['Armature'].pose.bones[0].matrix = M1
  57. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('location')
  58. bpy.data.objects['Armature'].pose.bones[0].keyframe_insert('rotation_quaternion')  
  59. M2 = Matrix.Translation(Vector((0, 2, 4)))
  60. bpy.data.objects['Armature'].pose.bones[1].matrix = M2
  61. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('location')
  62. bpy.data.objects['Armature'].pose.bones[1].keyframe_insert('rotation_quaternion')
  63. M3 = Matrix.Translation(Vector((0, 6, 8)))
  64. bpy.data.objects['Armature'].pose.bones[2].matrix = M3
  65. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('location')
  66. bpy.data.objects['Armature'].pose.bones[2].keyframe_insert('rotation_quaternion')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement