Foreach_get for selected vertex indices?

I came in to Blender several years ago now, really excited to write add-ons to try and improve selection behavior, but there were just so many artificial roadblocks built in to the API that over complicated access to the most very basic things like this.

I made a lot of progress but the amount of work and very ugly hacks needed to ever get things to a state where I could share them with other people wound up just not being worth the time and frustration. I hope this improves sometime in the near future. But until then I’ll probably just be watching from the sidelines.

There’s a python API papercuts thread, if you wish to describe the limitations that prevented you from success.

Yeah, dang. I’ll see if I can figure this out as welll…

I’m in bmesh/edit mode, and want to get a forEach list basically, with numpy, if verts are selected, so can feed into a batch/shader method to draw points/lines.

I’ve done it before, but with the entire mesh… but not only on partial stuff like verts/edges selected…
Unless I gotta make some NEW/Temp mesh in memory, with only those verts/edges to do that loop… but that seems stupid… haha