Hi, this is something I couldn’t solve… I am able to transform or delete two python selected verts, but when trying to do path selection it does not work. What am I doing wrong?
import bpy, random
ob = bpy.context.object
verts = ob.data.vertices
bpy.ops.object.mode_set()
v1 = int(len(verts)*random.random())
v2 = int(len(verts)*random.random())
verts[v1].select = verts[v2].select = True
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_vertex_path(type='EDGE_LENGTH')
# Path Selection requires that exactly two vertices be selected
It probably is working, you need to toggle out and back into edit mode again to see the results. There are all kinds of weird caching problems like this: I think the correspondence between Python API structures and Blender internal structures is made up on the fly, and then discarded after use, only to be remade again the next time. :spin:
Thanks for answering but I tried that with no luck, Blender sees the selection and lets me transform the points for instance, but not do path select, it says two points are needed so I think it does not see them.