[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48048] trunk/blender/source/blender/ editors/sculpt_paint/sculpt_undo.c: Fix for sculpt undo updating hidden rather than coords.

Nicholas Bishop nicholasbishop at gmail.com
Mon Jun 18 19:49:31 CEST 2012


Revision: 48048
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48048
Author:   nicholasbishop
Date:     2012-06-18 17:49:31 +0000 (Mon, 18 Jun 2012)
Log Message:
-----------
Fix for sculpt undo updating hidden rather than coords.

Fixes bug [#31858] Undo + sculpt mode, which exposed the bug by having
two objects use the same mesh data.

The rebuild variable was initialize to true, so multires data was
getting marked as having GridHidden modified rather than coords
modified.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/sculpt_undo.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt_undo.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt_undo.c	2012-06-18 17:11:53 UTC (rev 48047)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt_undo.c	2012-06-18 17:49:31 UTC (rev 48048)
@@ -269,7 +269,7 @@
 	SculptSession *ss = ob->sculpt;
 	SculptUndoNode *unode;
 	MultiresModifierData *mmd;
-	int update = 0, rebuild = 1;
+	int update = FALSE, rebuild = FALSE;
 
 	sculpt_update_mesh_elements(scene, sd, ob, 0);
 
@@ -297,15 +297,15 @@
 		switch (unode->type) {
 			case SCULPT_UNDO_COORDS:
 				if (sculpt_undo_restore_coords(C, dm, unode))
-					update = 1;
+					update = TRUE;
 				break;
 			case SCULPT_UNDO_HIDDEN:
 				if (sculpt_undo_restore_hidden(C, dm, unode))
-					rebuild = 1;
+					rebuild = TRUE;
 				break;
 			case SCULPT_UNDO_MASK:
 				if (sculpt_undo_restore_mask(C, dm, unode))
-					update = 1;
+					update = TRUE;
 				break;
 		}
 	}




More information about the Bf-blender-cvs mailing list