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:
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_sculpt.h4
-rw-r--r--source/blender/blenkernel/intern/scene.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_sculpt.h b/source/blender/blenkernel/BKE_sculpt.h
index 08db1ac632e..54cafc984a6 100644
--- a/source/blender/blenkernel/BKE_sculpt.h
+++ b/source/blender/blenkernel/BKE_sculpt.h
@@ -59,6 +59,10 @@ typedef struct SculptSession {
/* Used to cache the render of the active texture */
unsigned int texcache_side, *texcache, texcache_actual;
+ /* Layer brush persistence between strokes */
+ float (*mesh_co_orig)[3]; /* Copy of the mesh vertices' locations */
+ float *layer_disps; /* Displacements for each vertex */
+
void *cursor; /* wm handle */
struct SculptStroke *stroke;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index d629654c426..a44118d186b 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -689,6 +689,13 @@ void sculptsession_free(Sculpt *sculpt)
if(ss->texcache)
MEM_freeN(ss->texcache);
+
+ if(ss->layer_disps)
+ MEM_freeN(ss->layer_disps);
+
+ if(ss->mesh_co_orig)
+ MEM_freeN(ss->mesh_co_orig);
+
MEM_freeN(ss);
sculpt->session= NULL;
}