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-08-09 21:21:40 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2009-08-09 21:21:40 +0400
commitc1ca2ab5dceb8d5355215a3c7a80b171f394e487 (patch)
tree8e428dba4ed0b6898e951350fb93641b9564a6f8 /source/blender/blenkernel
parentb58083ea5514699656d7937a80efb7e4bc9581f2 (diff)
Sculpt/2.5:
* Added toolbar UI for setting "anchored" mode * Added a "persistent" mode for the layer brush; basically you can keep sculpting on the same layer between strokes when this is on. There's a button to reset the base so you can add another layer on top of that, and so on. This feature was suggested by Blenderer on BA, thanks! Note, I think these options could use better names in the UI, but I couldn't really think of anything very descriptive, suggestions welcome
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;
}