I did the most simple code I could. you need to select 2 verts in edit mode on the default cube. which has already UVs. So my question is how to update UVs to the new geometry?
import bpy,bmesh me = bpy.context.object.data bm = bmesh.from_edit_mesh(me) bm.verts.ensure_lookup_table() hist = bm.select_history v1=hist v2=hist v1.co = v1.co.lerp(v2.co,1) bmesh.ops.remove_doubles(bm, verts=list(hist), dist=0.0001) #there? if I want to update UVs uv_layer = bm.loops.layers.uv.active for face in bm.faces: for loop in face.loops: loop[uv_layer].uv = ? bm.normal_update() bmesh.update_edit_mesh(me)