1
$\begingroup$

Can someone please explain to me how I go about selecting edge loops in BMesh? I'm new to Blender scripting and am venturing into BMesh but I can not figure out how to actual select an edge loop. Let's say I'm starting with an edge. How then do I go about getting and selecting the edge loop that that edge is a part of? Please and thank you!

$\endgroup$

1 Answer 1

3
$\begingroup$

This is almost a duplicate of this question. Simply add the select statement at the end. I also branched the code sample to go in both directions of the first edge.

e = bm.edges[0]

for loop in e.link_loops:
    if len(loop.vert.link_edges) == 4:
        e.select = True

        while len(loop.vert.link_edges) == 4:
            # jump between BMLoops to the next BMLoop we need
            loop = loop.link_loop_prev.link_loop_radial_prev.link_loop_prev

            # following edge in the edge loop
            e_next = loop.edge
            e_next.select = True
$\endgroup$
1
  • $\begingroup$ Awesome, thanks! I saw that one but for some reason I couldn't ever get it to work let alone how it actually works. $\endgroup$ Commented Jun 11, 2018 at 1:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .