Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_ccg.c')
-rw-r--r--source/blender/blenkernel/intern/subdiv_ccg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_ccg.c b/source/blender/blenkernel/intern/subdiv_ccg.c
index 0997b42a19f..a59f9e0c633 100644
--- a/source/blender/blenkernel/intern/subdiv_ccg.c
+++ b/source/blender/blenkernel/intern/subdiv_ccg.c
@@ -1878,12 +1878,14 @@ static void adjacet_vertices_index_from_adjacent_edge(const SubdivCCG *subdiv_cc
const int poly_index = BKE_subdiv_ccg_grid_to_face_index(subdiv_ccg, coord->grid_index);
const MPoly *p = &mpoly[poly_index];
*r_v1 = mloop[coord->grid_index].v;
+
+ const int corner = poly_find_loop_from_vert(p, &mloop[p->loopstart], *r_v1);
if (coord->x == grid_size_1) {
- const MLoop *next = ME_POLY_LOOP_NEXT(mloop, p, coord->grid_index);
+ const MLoop *next = ME_POLY_LOOP_NEXT(mloop, p, corner);
*r_v2 = next->v;
}
if (coord->y == grid_size_1) {
- const MLoop *prev = ME_POLY_LOOP_PREV(mloop, p, coord->grid_index);
+ const MLoop *prev = ME_POLY_LOOP_PREV(mloop, p, corner);
*r_v2 = prev->v;
}
}