[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41720] trunk/blender/source/blender/ modifiers/intern/MOD_edgesplit.c: Workaround #29205: Crash while using Edge Split modifier ( while rotating vertices in edit mode with edge split viewable)

Sergey Sharybin g.ulairi at gmail.com
Thu Nov 10 09:29:25 CET 2011


Revision: 41720
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41720
Author:   nazgul
Date:     2011-11-10 08:29:22 +0000 (Thu, 10 Nov 2011)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/modifiers/intern/MOD_edgesplit.c

Modified: trunk/blender/source/blender/modifiers/intern/MOD_edgesplit.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_edgesplit.c	2011-11-10 06:06:35 UTC (rev 41719)
+++ trunk/blender/source/blender/modifiers/intern/MOD_edgesplit.c	2011-11-10 08:29:22 UTC (rev 41720)
@@ -1029,12 +1029,17 @@
 
 		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




More information about the Bf-blender-cvs mailing list