diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-02-10 22:00:44 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-02-10 22:00:44 +0300 |
commit | 3c5d5fb1cad25d75df3a3a032e86a58957311fd2 (patch) | |
tree | 7065899ee9e1a75d79b9558607827009874f212d /mesh_inset/__init__.py | |
parent | 039f3646b5a2a3a76fd43df1a2cf68bc0242f1c7 (diff) | |
parent | 6266b4139503bb614576f15ea4e90870ac5e597d (diff) |
Merge branch 'master' into fbx_io_export_ignore_parentsfbx_io_export_ignore_parents
Conflicts:
io_scene_fbx/import_fbx.py
Diffstat (limited to 'mesh_inset/__init__.py')
-rw-r--r-- | mesh_inset/__init__.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mesh_inset/__init__.py b/mesh_inset/__init__.py index 316e4592..28fa2131 100644 --- a/mesh_inset/__init__.py +++ b/mesh_inset/__init__.py @@ -151,10 +151,10 @@ def do_inset(mesh, amount, height, region, as_percent): for i in range(orig_numv, len(m.points.pos)): bvertnew = bm.verts.new(m.points.pos[i]) bm.verts.index_update() + bm.verts.ensure_lookup_table() new_faces = [] start_faces = len(bm.faces) for i, newf in enumerate(blender_faces): - bm.verts.ensure_lookup_table() vs = remove_dups([bm.verts[j] for j in newf]) if len(vs) < 3: continue @@ -167,13 +167,13 @@ def do_inset(mesh, amount, height, region, as_percent): # bfacenew.copy_from_face_interp(oldface) else: bfacenew = bm.faces.new(vs) - # remove original faces + new_faces.append(bfacenew) + # deselect original faces for face in selfaces: face.select_set(False) - bm.faces.remove(face) - bm.faces.index_update() - # mesh.update(calc_edges=True) - # select all new faces + # remove original faces + bmesh.ops.delete(bm, geom=selfaces, context=5) # 5 = DEL_FACES + # select all new faces (should only select inner faces, but that needs more surgery on rest of code) for face in new_faces: face.select_set(True) |