diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-06 19:46:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-06 19:46:35 +0300 |
commit | 132783328209f24873629113665f01b35364fdd0 (patch) | |
tree | 4632fc09d8fc119a22e4f9907e3c49e8f5fcf7e5 /source/blender/editors/sculpt_paint/paint_undo.c | |
parent | 9c1c0152df19d982b14ea9a58c1c19c0f378680b (diff) |
Sculpt: WIP brush behavior changes
* Draw/Inflate/Layer now keep working on the original mesh coordinates and
normals from when the stroke started. This helps avoid the mesh blowing
up, but can still be better. The old behavior is still available as
"Accumulate" in the UI.
* This requires some more memory usage for the BVH, would like to find a
way to avoid that.
* Smooth falloff is now the default.
* Spacing is now enabled by default, with a value of 7.5.
* Anchored now stores normals per node to save some memory.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_undo.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_undo.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c index 9bc6cacbb16..05f2b565e82 100644 --- a/source/blender/editors/sculpt_paint/paint_undo.c +++ b/source/blender/editors/sculpt_paint/paint_undo.c @@ -191,10 +191,14 @@ void undo_paint_push_begin(int type, char *name, UndoRestoreCb restore, UndoFree ListBase *undo_paint_push_get_list(int type) { - if(type == UNDO_PAINT_IMAGE) - return &ImageUndoStack.current->elems; - else if(type == UNDO_PAINT_MESH) - return &MeshUndoStack.current->elems; + if(type == UNDO_PAINT_IMAGE) { + if(ImageUndoStack.current) + return &ImageUndoStack.current->elems; + } + else if(type == UNDO_PAINT_MESH) { + if(MeshUndoStack.current) + return &MeshUndoStack.current->elems; + } return NULL; } |