Discover selected vertex

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Posts: 0
Joined: Sat Aug 03, 2013 12:23 pm

Discover selected vertex

Post by isiluin »

I am trying to discover which vertex (or vertices) of a mesh are selected. I am using the following in the python console:

Code: Select all

>>> obj ="Cube")
>>> for v in
... print(v,
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?

Post Reply