I have many 2d meshes that have many edge loops created with the Inset Straight Skeleton Tool and I'm hoping I can clean up some of the unwanted edge loops in an automated way.
So far I've found:
import bpy
import bmesh
context = bpy.context
obj = context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)
bm.select_mode |= {'EDGE'}
for e in bm.edges:
e.select = e.is_boundary
bm.select_flush_mode()
me.update()
Or potentially more simply done with bpy.ops.mesh.region_to_loop()
This will let me select the outer edge loop, but I am struggling to find anything that will let me select the innermost edge loop properly. If I can select both of these then I can just perform an inverse selection and delete the unwanted edges inbetween them. Does anyone know why my inner loop selection would not be selecting the innermost loop?
Using Select Loop Inner-Region from the Select menu produces an unexpexted result. (or bpy.ops.mesh.loop_to_region() in Python)