diff options
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_unwrap_ops.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 3f218136751..9f2b0f1af14 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -217,7 +217,7 @@ void ED_uvedit_get_aspect(Scene *scene, Object *ob, BMesh *bm, float *aspx, floa } static void construct_param_handle_face_add(ParamHandle *handle, Scene *scene, - BMFace *efa, const int cd_loop_uv_offset) + BMFace *efa, int face_index, const int cd_loop_uv_offset) { ParamKey key; ParamKey *vkeys = BLI_array_alloca(vkeys, efa->len); @@ -230,7 +230,7 @@ static void construct_param_handle_face_add(ParamHandle *handle, Scene *scene, BMIter liter; BMLoop *l; - key = (ParamKey)efa; + key = (ParamKey)face_index; /* let parametrizer split the ngon, it can make better decisions * about which split is best for unwrapping than scanfill */ @@ -256,6 +256,7 @@ static ParamHandle *construct_param_handle(Scene *scene, Object *ob, BMesh *bm, BMLoop *l; BMEdge *eed; BMIter iter, liter; + int i; const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV); @@ -273,7 +274,7 @@ static ParamHandle *construct_param_handle(Scene *scene, Object *ob, BMesh *bm, /* we need the vert indices */ BM_mesh_elem_index_ensure(bm, BM_VERT); - BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) { + BM_ITER_MESH_INDEX (efa, &iter, bm, BM_FACES_OF_MESH, i) { if ((BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) || (sel && BM_elem_flag_test(efa, BM_ELEM_SELECT) == 0)) { continue; @@ -293,7 +294,7 @@ static ParamHandle *construct_param_handle(Scene *scene, Object *ob, BMesh *bm, } } - construct_param_handle_face_add(handle, scene, efa, cd_loop_uv_offset); + construct_param_handle_face_add(handle, scene, efa, i, cd_loop_uv_offset); } if (!implicit) { @@ -449,7 +450,7 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, Object *ob, B /* We will not check for v4 here. Subsurfed mfaces always have 4 vertices. */ BLI_assert(mpoly->totloop == 4); - key = (ParamKey)mpoly; + key = (ParamKey)i; vkeys[0] = (ParamKey)mloop[0].v; vkeys[1] = (ParamKey)mloop[1].v; vkeys[2] = (ParamKey)mloop[2].v; |