diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2012-06-27 21:08:12 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2012-06-27 21:08:12 +0400 |
commit | ae2f3a4e5e3741b8ffa14ed86eda9e7058bc5393 (patch) | |
tree | 9763252eeba9fb7841a1c802921cebc771819a77 /source/blender/bmesh/intern | |
parent | df201548ead1ef341e18c003661d136fdce8eca9 (diff) |
Fix for #31581, UVs shrink on edge slide.
Issue is that all loops of a face adjacent to the sliding verts were
getting project-corrected. Introduced a test to only project the
affected loops.
The projection code introduces a small offset to the boundaries so that
any boundary tests can work as expected, but this leads to shrinking of
the barycentric coordinates of the projection, causing a shrink of the
uvs in turn. This even affects the uvs that -should- be affected though
the unfixed behavior works strangely in a correctish way (my guess is
because the projection uses the same face as the opposite sliding loop).
I fixed the behaviour by taking the mean value of the uvs. This won't
support seams but current code doesn't either. Also, all CustomData to
exhibit this unfixed behaviour. I only fixed the uv case, other data
(Vcolors, etc) will have discontinuities when edge sliding. I expect
that the CorrectUV code I am working on may address some of these
issues.
Also, added NULL checks for utility function (was intended for this bug
but wasn't needed after all)
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c index ce4ce87b31f..b6a56e64dcf 100644 --- a/source/blender/bmesh/intern/bmesh_queries.c +++ b/source/blender/bmesh/intern/bmesh_queries.c @@ -196,7 +196,12 @@ BMLoop *BM_loop_other_vert_loop(BMLoop *l, BMVert *v) BMLoop *BM_vert_find_first_loop(BMVert *v) { - BMEdge *e = bmesh_disk_faceedge_find_first(v->e, v); + BMEdge *e; + + if(!v || !v->e) + return NULL; + + e = bmesh_disk_faceedge_find_first(v->e, v); return bmesh_radial_faceloop_find_first(e->l, v); } |