The script is simple:
import bpy, bmesh mesh = bpy.context.edit_object.data bm = bmesh.from_edit_mesh(mesh) geom = [e for e in bm.verts[:] + bm.edges[:] + bm.faces[:] if e.select] cut_layer = bm.edges.layers.int.new('cut') ret = bmesh.ops.bisect_plane(bm, geom=geom , plane_co=(0,1,0), plane_no=(0, 1, 0)) bm.edges.layers.int.remove(cut_layer) bmesh.update_edit_mesh(mesh)
I get the error:
TypeError: geom: 8 BMEdge has been removed
Here's an example blend file:
Can anyone explain what's going wrong here? I know the function itself looks a little pointless but that's because I've boiled the problem down to it's simplest form. Why does the operation have a problem with the new edge layer I've added? I can't find anything online about this...