compify/uv_utils.py
Nathan Vegdahl d7aa7cc8ca Add UV margin setting.
It's a little hacky, but mostly works.
2022-04-09 13:20:31 -07:00

11 lines
269 B
Python

from math import inf
def leftmost_u(mesh_objects, uv_layer_name):
leftmost = inf
for obj in mesh_objects:
uvs = obj.data.uv_layers[uv_layer_name].data
for uv in uvs:
leftmost = min(leftmost, uv.uv[0])
return leftmost