0
$\begingroup$

I want to make use of the bmesh module to update mesh selection.
To select vertices works as expected, but to unselect vertices does not work for me...

Am I missing something or is this a bug?

bm = bmesh.new()
bm.from_mesh(obj.data)

bm.verts.ensure_lookup_table()

#this works

for v in bm.verts:
    v.select = True

#this does not work

for v in bm.verts:
    v.select = False

bm.to_mesh(obj.data)
bm.free()
$\endgroup$
  • 2
    $\begingroup$ This is probably due to the selection states of faces and edges. $\endgroup$ – lemon Mar 13 at 17:14
  • $\begingroup$ thanks @lemon! using faces solved the problem! :) $\endgroup$ – f.bra Mar 13 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.