Removing vertex selection for BMesh

As with normal mesh manipulation via the Blender Python API, when using the BMesh object to deselect vertices, it is not enough to simply change the value of their “select” property to the opposite. To deselect the vertices of the BMesh object, the “select” value must also be changed for the edges and polygons adjacent to them.

Manipulations with the BMesh object are carried out in object mode. Switch to it.

Create a BMesh object, using the data of the current active object for it.

If we try to deselect just the vertices:

We won’t see any result.

To remove the selection, remove it sequentially for faces, edges and vertices.

Flush the changed data back into the active object

And switch back to the edit mode

Now we can see that all the selection from the vertices of the mesh is completely removed.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comment
Inline Feedbacks
View all comments