bmesh: selection state of vertices not always correct #32446

Closed
opened 2012-08-30 06:17:37 +02:00 by Florian Meyer · 5 comments
Member

%%%r50265

This is about a bmesh constructed from a live mesh via bme = bmesh.from_edit_mesh(object.data)

bme.verts[some_index].select is not always true to the selection state as it should be.

If the mesh is in edge select mode and for example an edgering of edges is selected then all the vertices contained in those edges should have vert.select = True
This is the case most of the times.

However if first the edgeloop is selected and then one edge on the border (or end of the loop) is deselected
then both vertices contained in that edge have vert.select = False.

Even though one of them should still be True since the neighboring edge (from the edgeloop) is still selected.

I hope this explanation is clear enough.
%%%

%%%r50265 This is about a bmesh constructed from a live mesh via bme = bmesh.from_edit_mesh(object.data) bme.verts[some_index].select is not always true to the selection state as it should be. If the mesh is in edge select mode and for example an edgering of edges is selected then all the vertices contained in those edges should have vert.select = True This is the case most of the times. However if first the edgeloop is selected and then one edge on the border (or end of the loop) is deselected then both vertices contained in that edge have vert.select = False. Even though one of them should still be True since the neighboring edge (from the edgeloop) is still selected. I hope this explanation is clear enough. %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%I found a way to redo and fixed that case now, but it involves undo. It's not clear to me if that's the same bug you found, if it's not please give exact steps.

  • enter edit mode on default cube, switch to edge select mode
  • subdivide
  • select edge ring
  • shift+click to deselect one of the edges (header shows 8/26 vertices selected)
  • undo
  • shift+click again to deselect the same edge (header shows 6/26 vertices selected)

If you are doing the selecting/deselecting using a script, be sure to use .select_set(..) functions rather than setting .select directly, only the former will automatically do vertex/edge/face selection syncing.%%%

%%%I found a way to redo and fixed that case now, but it involves undo. It's not clear to me if that's the same bug you found, if it's not please give exact steps. * enter edit mode on default cube, switch to edge select mode * subdivide * select edge ring * shift+click to deselect one of the edges (header shows 8/26 vertices selected) * undo * shift+click again to deselect the same edge (header shows 6/26 vertices selected) If you are doing the selecting/deselecting using a script, be sure to use .select_set(..) functions rather than setting .select directly, only the former will automatically do vertex/edge/face selection syncing.%%%
Author
Member

%%%It seems to be fixed. thanks.
It is very probable that it was that undo thing.
I was repeatedly testing my script which is working on the selection
undoing a lot in the process of selecting executing and so forth.
but it is working now. %%%

%%%It seems to be fixed. thanks. It is very probable that it was that undo thing. I was repeatedly testing my script which is working on the selection undoing a lot in the process of selecting executing and so forth. but it is working now. %%%

%%%Great, thanks for testing, closing report then.%%%

%%%Great, thanks for testing, closing report then.%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#32446
No description provided.