Why doesn't my script work on all of the vertices of a mesh? So, I wrote this script to read UVs from a mesh and use the values to position the actual vertices on the same coordinates, but in 3D space, here's the script:

import bpy
import bmesh
from mathutils import Vector

obj = bpy.context.active_object
me = obj.data
bm = bmesh.from_edit_mesh(me)
uv_layer = bm.loops.layers.uv.verify() #get the uv layer
bm.faces.layers.tex.verify() #get the faces inside the uv map

for f in bm.faces: #for each face get the value of X and Y and transfer it to the 3D vertices
    for l in f.loops:
        luv = l[uv_layer]
        if luv.select:
            l.vert.co.xz = (luv.uv*200)-Vector((100,100))
            l.vert.co.y = 0

bmesh.update_edit_mesh(me) #update the mesh


It works fine, but it only works in a portion of the mesh, not it's entirety, and I don't know why, can someone shed a light on this subject?
Oh nevermind. All I had to do was remove the line: if luv.select: so that the script doesn't verify if the uv layer is selected for all vertices.