diff options
Diffstat (limited to 'release/scripts/startup/bl_operators/uvcalc_smart_project.py')
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_smart_project.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index 622d19a0cfa..bb3086f711b 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -757,12 +757,9 @@ def VectoQuat(vec): class thickface(object): __slost__= "v", "uv", "no", "area", "edge_keys" - def __init__(self, face, uvface, mesh_verts): + def __init__(self, face, uv_layer, mesh_verts): self.v = [mesh_verts[i] for i in face.vertices] - if len(self.v)==4: - self.uv = uvface.uv1, uvface.uv2, uvface.uv3, uvface.uv4 - else: - self.uv = uvface.uv1, uvface.uv2, uvface.uv3 + self.uv = [uv_layer[i].uv for i in face.loop_indices] self.no = face.normal self.area = face.area @@ -892,13 +889,13 @@ def main(context, if not me.uv_textures: # Mesh has no UV Coords, don't bother. me.uv_textures.new() - uv_layer = me.uv_textures.active.data + uv_layer = me.uv_loop_layers.active.data me_verts = list(me.vertices) if USER_ONLY_SELECTED_FACES: - meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.select] + meshFaces = [thickface(f, uv_layer, me_verts) for i, f in enumerate(me.polygons) if f.select] else: - meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces)] + meshFaces = [thickface(f, uv_layer, me_verts) for i, f in enumerate(me.polygons)] if not meshFaces: continue @@ -1117,7 +1114,7 @@ class SmartProject(Operator): angle_limit = FloatProperty( name="Angle Limit", - description="lower for more projection groups, higher for less distortion", + description="Lower for more projection groups, higher for less distortion", min=1.0, max=89.0, default=66.0, ) |