-
-
Save zeffii/9789082 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import bmesh | |
obj = bpy.context.active_object | |
me = obj.data | |
bm = bmesh.from_edit_mesh(me) | |
me.update() | |
edges = bm.edges | |
ok = lambda v: v.select and not v.hide | |
idxs = [v.index for v in edges if ok(v)] | |
ei = [bm.edges[i].verts for i in idxs] | |
ii = ei[0][0].index, ei[0][1].index, ei[1][0].index, ei[1][1].index | |
print(ii) | |
# polygon indices? must be nicer ways. | |
[[i.index for i in p] for p in [p.verts for p in bm.faces]] | |
[[i.index for i in p.verts] for p in bm.faces[:]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment