Mel/python solution for selecting face loops?

So maya has a convenient command for selecting the currently selected edge’s loop (select > convert selection > to edge loop) but there is not the equivalent for faces.

I know you can do shift + double click, but this is very cumbersome for me, especially when I have to select multiple face loops that are none adjacent, often I make a mistake and have start from the top. What I would like to do is:

  1. select individual faces
  2. execute a command that select each faces loop (select > convert selection > to edge loop)

I thought of writing a simple macro in AutoHotkey (a external scripting language) that would:

  1. convert all the selected edges to faces (select > convert selection > to edges)
  2. select all their edge loops (select > convert selection > to edge loop)
  3. convert the edge loops back to faces (select > convert selection > to faces)

but when you convert a face selection to edges (select > convert selection > to edges) it will always select the faces border (its 4 edges), and so select > convert selection > to edge loop, does will give me an edge lop on both directions (both horizontally and vertically)

I am thinking there is a much better way to do things here, is there a mell/python command for selecting a faces loop? I tried chatGPT and it gave me code that were using two none existent commands.

If I’m understanding you correctly, I don’t think you want to go via edge loops, you want rings. If you convert any arbitrary selected edges into rings, these form the internal edges of a face path/loop, so can be converted directly into that. This means you can select any entire face “loop” from a single edge. See the attached gif.
edge_to_face
I used the Marking Menu here, just so it would all fit on one small gif, but the same commands are available on the select menu, so can be converted into shelf buttons or the runtime commands shown if you want to convert it into a script or hotkey.

With regards to making this work from an initial face selection, that doesn’t really logically work, because a single quad face has two pairs of edges (two potential path/loop directions), so you would still have to have some additional selection or ruleset to define which way it should propagate.

1 Like

I had not thought of the propagation issue, now I can see why they did not add it in the first place. I should be able to write something myself in due time, should be fun.

I appreciate the alternative solution you share here, I will be using it going forward. Thanks.