Discover selected vertex
Posted: Sat Aug 03, 2013 10:26 pm
I am trying to discover which vertex (or vertices) of a mesh are selected. I am using the following in the python console:
which correctly prints a list of the current selection status. If I then select a different vertex (in the 3D view edit mode) and re-run the code fragment the output remains the same (i.e. it does not reflect the changed selection.) If I then change to object mode and back to edit mode the correct selections are returned. Is this the expected behaviour or am I missing something here?
Code: Select all
>>> obj = bpy.data.objects.get("Cube") >>> for v in obj.data.vertices: ... print(v, v.select) ...