svn merge ^/trunk/blender -r41226:41227 .
[blender.git] / source / blender / editors / sculpt_paint / sculpt_undo.c
index a13b874e50423641d3f76915feafc9474afff361..014cbff3e222fa8d618bc9080933431d8f83a760 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -39,6 +37,8 @@
 
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
+#include "BLI_string.h"
+#include "BLI_listbase.h"
 #include "BLI_ghash.h"
 #include "BLI_threads.h"
 
@@ -196,10 +196,10 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
                tag_update= ((Mesh*)ob->data)->id.us > 1;
 
                if(ss->modifiers_active) {
-                       Mesh *me= ob->data;
-                       mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
+                       Mesh *mesh= ob->data;
+                       mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL, NULL, 0, NULL, NULL);
 
-                       sculpt_free_deformMats(ss);
+                       free_sculptsession_deformMats(ss);
                        tag_update|= 1;
                }
 
@@ -262,7 +262,7 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node)
        }
 
        unode= MEM_callocN(sizeof(SculptUndoNode), "SculptUndoNode");
-       strcpy(unode->idname, ob->id.name);
+       BLI_strncpy(unode->idname, ob->id.name, sizeof(unode->idname));
        unode->node= node;
 
        BLI_pbvh_node_num_verts(ss->pbvh, node, &totvert, &allvert);