Hi, all! Please look at the following script:
count = 0
____#mesh = bpy.types.Mesh
____#v = bpy.types.MeshVertex
____for v in mesh.vertices: ________if v.select: ____________count += 1 ____print(count)
As you can see, I want to get the count of a mesh’s selected vertices. When I run this script from the Blender default file, I always get the same answer : 8 ( which makes some kind of sense, as the only available mesh is a cube ).
The context (object or edit) doesn’t matter. The cube can be selected or not: it doesn’t matter. All vertices can be selected in edit mode, some of them or none of them: it doesn’t matter.
I can’t make any sense out of this.
Thanks in advance,
P.S : I also can’t fix the indents in this post and that’s why I use underscores here. But please take my word: they are correct :o