Skip to content

Instantly share code, notes, and snippets.

@rubber-duck
Created April 15, 2015 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubber-duck/2350d2361a2afd4408ab to your computer and use it in GitHub Desktop.
Save rubber-duck/2350d2361a2afd4408ab to your computer and use it in GitHub Desktop.
import bmesh
import bpy
bm = bmesh.new()
bm.from_mesh(bpy.context.object.data)
bm.faces.ensure_lookup_table()
bm.verts.ensure_lookup_table()
new_face = bm.faces[0].copy()
bm.verts.ensure_lookup_table()
bm.faces.ensure_lookup_table()
assert(new_face.verts[0].index != -1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment