Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-05-25 03:05:27 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2009-05-25 03:05:27 +0400
commitedd783db737c2ea6b97b3bb982bd643f840ccd0e (patch)
treec84f011659a3074901f35a837a8eaf11f100abd7 /source/blender/editors/sculpt_paint
parentab407f6ac748225386c5f09685490d6df67916f8 (diff)
2.5/Sculpt:
Bugfix for doing a multires subdivision while in sculptmode (forgot to resize projected vertices.)
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 8f1e3826314..a106df7745c 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1064,6 +1064,7 @@ static void sculpt_update_mesh_elements(bContext *C)
{
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 @@ static void sculpt_update_mesh_elements(bContext *C)
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);