I want to select a mesh's non-manifold edges and store their indices in a Python List. The following code runs but the list is empty. After running the script, I can see in the Viewport that the correct non-manifold edges are selected, and with the user interface developer extras I can see each edge's index.
bpy.ops.mesh.select_all(action='DESELECT')
bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='EDGE')
# Select non-manifold edges and store their IDs in another array
non_manifold_edges = []
bpy.ops.mesh.select_non_manifold()
for edge in bpy.context.active_object.data.edges:
if edge.select:
non_manifold_edges.append(edge.index)
# Print the non-manifold edge IDs to the Blender Python Console for debugging purposes
print("Non-manifold edge IDs: ", non_manifold_edges)
Why does the code above run without any errors? After completion the output for the non_manifold_edges list has no items. Why?
