I have a problem about Python scripting in Blender.
I want to get selected UV pairs on same edge and write below code.
obj = context.active_object bm = bmesh.from_edit_mesh(obj.data) uv_layer = bm.loops.layers.uv.verify() sel_faces = [f for f in bm.faces if f.select] # get selected UV lists in UV/Image Editor cand_loops =  for f in sel_faces: for l in f.loops: if l[uv_layer].select: cand_loops.append(l) # get UV pairs which two UVs on the edge are selected in UV/Image Editor selected_uv_pairs =  for l in cand_loops: le = l.edge # two UVs are selected (This if-statement **DOES NOT** work correctly) if le.link_loops[uv_layer].select and le.link_loops[uv_layer].select: selected_uv_pairs.append(le)
But above code does not work correctly.
Please tell me the idea to obtain selected UV pairs on same edge.