(mesh)
return uv_layers, uv_indices
:param mesh:
    :rtype: [[], ...], [{}, ...]
def _uvs(mesh):
    """

    :param mesh:
    :rtype: [[], ...], [{}, ...]

    """
    uv_layers = []
    uv_indices = []

    for layer in mesh.uv_layers:
        uv_layers.append([])
        uv_indices.append({})
        index = 0

        for uv_data in layer.data:
            uv_tuple = (uv_data.uv[0], uv_data.uv[1])
            uv_key = str(uv_tuple)

            try:
                uv_indices[-1][uv_key]
            except KeyError:
                uv_indices[-1][uv_key] = index
                uv_layers[-1].append(uv_tuple)
                index += 1

    return uv_layers, uv_indices
def _uvs ( mesh ) : uv_layers = [ ] uv_indices = [ ] for layer in mesh . uv_layers : uv_layers . append ( [ ] ) uv_indices . append ( { } ) index = 0 for uv_data in layer . data : uv_tuple = ( uv_data . uv [ 0 ] , uv_data . uv [ 1 ] ) uv_key = str ( uv_tuple ) try : uv_indices [ - 1 ] [ uv_key ] except KeyError : uv_indices [ - 1 ] [ uv_key ] = index uv_layers [ - 1 ] . append ( uv_tuple ) index += 1 return uv_layers , uv_indices