diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-06-01 23:36:26 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-06-01 23:37:06 +0300 |
commit | 1d4bae856690c7a4603789509a5842dd6b5f8be1 (patch) | |
tree | 6be194b9c0c4282a0ed7528f2a9b07ba51cbe4d4 /source/blender/editors/sculpt_paint/sculpt_filter_mesh.c | |
parent | 3778f168f688a6c76f5c0b54262b1ed82deb0c84 (diff) |
Sculpt: Cloth Filter
This tool is similar to the cloth brush, but it applies the cloth
simulation deformation to the whole mesh in an uniform way. The
simulation can be controlled using the mask to pin vertices and the face
sets to define force action areas.
It uses the same solver as the cloth brush which now no longer depends
on StrokeCache.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7857
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_filter_mesh.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_filter_mesh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c index fc3e130cc98..58c9e1a569e 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c @@ -121,6 +121,9 @@ void SCULPT_filter_cache_init(Object *ob, Sculpt *sd) void SCULPT_filter_cache_free(SculptSession *ss) { + if (ss->filter_cache->cloth_sim) { + SCULPT_cloth_simulation_free(ss->filter_cache->cloth_sim); + } MEM_SAFE_FREE(ss->filter_cache->nodes); MEM_SAFE_FREE(ss->filter_cache->mask_update_it); MEM_SAFE_FREE(ss->filter_cache->prev_mask); |