From 79ffbe96a3b0366bf8b68f90421501a9048faa76 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 28 Nov 2011 18:21:10 +0000 Subject: [PATCH] fix for error filling in index data --- source/blender/bmesh/intern/bmesh_construct.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c index 2c5258a4f7a..9c2b026ab70 100644 --- a/source/blender/bmesh/intern/bmesh_construct.c +++ b/source/blender/bmesh/intern/bmesh_construct.c @@ -575,6 +575,8 @@ BMesh *BM_Copy_Mesh(BMesh *bmold) f2 = BM_Make_Ngon(bm, v, v2, edges, f->len, 0); if (!f2) continue; + /* use totface incase adding some faces fails */ + BM_SetIndex(f2, (bm->totface-1)); /* set_inline */ ftable[i] = f2;