Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bpy.ops.object.mode_set(mode='POSE')
- for bone in bones:
- x = bone.location[0] + random.uniform(-0.2, 0.2)
- y = bone.location[1] + random.uniform(-0.2, 0.2)
- z = bone.location[2] + random.uniform(-0.2, 0.2)
- bone.location[0] = x
- bone.location[1] = y
- bone.location[2] = z
- bpy.context.scene.update()
- bpy.context.scene.render.filepath = outfile_name
- bpy.ops.render.render(write_still=True)
- import bpy
- import random
- armature = bpy.context.scene.objects['Armature']
- for pose_bone in armature.pose.bones:
- x = pose_bone.location[0] + random.uniform(-0.2, 0.2)
- y = pose_bone.location[1] + random.uniform(-0.2, 0.2)
- z = pose_bone.location[2] + random.uniform(-0.2, 0.2)
- pose_bone.location[0] = x
- pose_bone.location[1] = y
- pose_bone.location[2] = z
Add Comment
Please, Sign In to add comment