diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-01 13:12:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-01 13:21:24 +0300 |
commit | 22ecea9e38e708056262f3d98b0d0c6210da75cf (patch) | |
tree | 1551b8cc4a35863bd9098a2bb12cdb161c8196f7 /source/blender/blenkernel/intern | |
parent | 9139532dc8655f23b59da3ee399cc01d1fa2b7b2 (diff) |
Weight Paint: restore non-spray functionality
When painting with spray disabled - we need to re-apply
on top of the original each time.
Applying the soc-2016-pbvh-painting branch removed this.
While I'd added back a simple previous weight array,
this won't work when multiple groups are painted at once.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 849fb5c6b5a..c2f1d05dd89 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -49,6 +49,7 @@ #include "BKE_brush.h" #include "BKE_colortools.h" +#include "BKE_deform.h" #include "BKE_main.h" #include "BKE_context.h" #include "BKE_crazyspace.h" @@ -686,8 +687,12 @@ void BKE_sculptsession_free_vwpaint_data(struct SculptSession *ss) gmap = &ss->mode.wpaint.gmap; MEM_SAFE_FREE(ss->mode.wpaint.alpha_weight); - MEM_SAFE_FREE(ss->mode.wpaint.previous_weight); MEM_SAFE_FREE(ss->mode.wpaint.previous_accum); + if (ss->mode.wpaint.dvert_prev) { + BKE_defvert_array_free_elems(ss->mode.wpaint.dvert_prev, ss->totvert); + MEM_freeN(ss->mode.wpaint.dvert_prev); + ss->mode.wpaint.dvert_prev = NULL; + } } else { return; |