[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20386] branches/blender2.5/blender/source /blender/editors/sculpt_paint/sculpt.c: 2.5/Sculpt:

Nicholas Bishop nicholasbishop at gmail.com
Mon May 25 01:05:27 CEST 2009


Revision: 20386
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20386
Author:   nicholasbishop
Date:     2009-05-25 01:05:27 +0200 (Mon, 25 May 2009)

Log Message:
-----------
2.5/Sculpt:

Bugfix for doing a multires subdivision while in sculptmode (forgot to resize projected vertices.)

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/sculpt_paint/sculpt.c

Modified: branches/blender2.5/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/sculpt_paint/sculpt.c	2009-05-24 19:54:35 UTC (rev 20385)
+++ branches/blender2.5/blender/source/blender/editors/sculpt_paint/sculpt.c	2009-05-24 23:05:27 UTC (rev 20386)
@@ -1064,6 +1064,7 @@
 {
 	SculptSession *ss = CTX_data_tool_settings(C)->sculpt->session;
 	Object *ob = CTX_data_active_object(C);
+	int oldtotvert = ss->totvert;
 
 	if((ss->multires = sculpt_multires_active(ob))) {
 		DerivedMesh *dm = mesh_get_derived_final(CTX_data_scene(C), ob, CD_MASK_BAREMESH);
@@ -1082,7 +1083,10 @@
 		ss->face_normals = NULL;
 	}
 
-	if(ss->totvert != ss->fmap_size) {
+	if(ss->totvert != oldtotvert) {
+		if(ss->projverts) MEM_freeN(ss->projverts);
+		ss->projverts = NULL;
+
 		if(ss->fmap) MEM_freeN(ss->fmap);
 		if(ss->fmap_mem) MEM_freeN(ss->fmap_mem);
 		create_vert_face_map(&ss->fmap, &ss->fmap_mem, ss->mface, ss->totvert, ss->totface);





More information about the Bf-blender-cvs mailing list