Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for mesh in bpy.data.meshes:
- if mesh.name not in bpy.data.objects:
- continue
- o = bpy.data.objects[mesh.name]
- minx = min(mesh.vertices, key=lambda x:x.co[0]).co[0] * o.scale[0] + o.location[0]
- minz = min(mesh.vertices, key=lambda x:x.co[1]).co[1] * o.scale[1] + o.location[1]
- miny = min(mesh.vertices, key=lambda x:x.co[2]).co[2] * o.scale[2] + o.location[2]
- maxx = max(mesh.vertices, key=lambda x:x.co[0]).co[0] * o.scale[0] + o.location[0]
- maxz = max(mesh.vertices, key=lambda x:x.co[1]).co[1] * o.scale[1] + o.location[1]
- maxy= max(mesh.vertices, key=lambda x:x.co[2]).co[2] * o.scale[2] + o.location[2]
- print("{%.3f,%.3f,%.3f,%.3f,%.3f,%.3f}," % (minx, miny, minz, maxx, maxy, maxz))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement