Guest User

Untitled

a guest
Jun 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. bpy.ops.object.mode_set(mode='POSE')
  2. for bone in bones:
  3. x = bone.location[0] + random.uniform(-0.2, 0.2)
  4. y = bone.location[1] + random.uniform(-0.2, 0.2)
  5. z = bone.location[2] + random.uniform(-0.2, 0.2)
  6. bone.location[0] = x
  7. bone.location[1] = y
  8. bone.location[2] = z
  9. bpy.context.scene.update()
  10. bpy.context.scene.render.filepath = outfile_name
  11. bpy.ops.render.render(write_still=True)
  12.  
  13. import bpy
  14. import random
  15.  
  16. armature = bpy.context.scene.objects['Armature']
  17.  
  18. for pose_bone in armature.pose.bones:
  19. x = pose_bone.location[0] + random.uniform(-0.2, 0.2)
  20. y = pose_bone.location[1] + random.uniform(-0.2, 0.2)
  21. z = pose_bone.location[2] + random.uniform(-0.2, 0.2)
  22. pose_bone.location[0] = x
  23. pose_bone.location[1] = y
  24. pose_bone.location[2] = z
Add Comment
Please, Sign In to add comment