diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-10 12:29:22 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-10 12:29:22 +0400 |
commit | 1e035381d10068eb17345a88d42cebc0d579adf3 (patch) | |
tree | e6f011bfe4bb053bf5699e810d90c702a0200192 /source/blender/modifiers | |
parent | c2d6fc4da3f410ddadfdcc7105854f01b26e9e45 (diff) |
Workaround #29205: Crash while using Edge Split modifier (while rotating vertices in edit mode with edge split viewable)
This bug is caused by exactly the same reason as #26316: differences in how new vertices/edges
are getting calculated first and how they're adding later. In some cases extra vertices are
creating which weren't counted before.
This patch prevents crash in such situations, but result mesh can be a bit wrong.
This should work fine in bmesh, so think it's acceptable to have such workaround
before actual fix coming with bmesh.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_edgesplit.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index 939ce123613..a4097d8967b 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -1029,12 +1029,17 @@ static void split_edge(SmoothEdge *edge, SmoothVert *vert, SmoothMesh *mesh) vert2 = smoothvert_copy(vert, mesh); - /* replace vert with its copy in visited_faces (must be done after - * edge replacement so edges have correct vertices) - */ - repdata.find = vert; - repdata.replace = vert2; - BLI_linklist_apply(visited_faces, face_replace_vert, &repdata); + /* bug [#29205] which is caused by exactly the same reason as [#26316] + this check will only prevent crash without fixing actual issue and + some vertices can stay unsplitted when they should (sergey) */ + if(vert2) { + /* replace vert with its copy in visited_faces (must be done after + * edge replacement so edges have correct vertices) + */ + repdata.find = vert; + repdata.replace = vert2; + BLI_linklist_apply(visited_faces, face_replace_vert, &repdata); + } /* copying and replacing is done; the mesh should be consistent. * now propagate the split to the vertex at the other end |