diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-29 12:55:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-29 12:55:00 +0300 |
commit | e3fe8128e41bb7c576f02ba234dfabf5c399cb60 (patch) | |
tree | cd148a38fb32cdb1a36fc576b9f36fe864003e40 /source/blender/blenkernel/intern/paint.c | |
parent | 31be6fccf83095f4245f97730ccc7e61e51cfcec (diff) | |
parent | 5a1954a5cbd7b0b1458fdc80ada5acd036278309 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index db13c23aa5f..e7ccb819b36 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -469,7 +469,7 @@ bool BKE_paint_select_vert_test(Object *ob) (ob->type == OB_MESH) && (ob->data != NULL) && (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_VERT_SEL) && - (ob->mode & OB_MODE_WEIGHT_PAINT) + (ob->mode & OB_MODE_WEIGHT_PAINT || ob->mode & OB_MODE_VERTEX_PAINT) ); } @@ -683,6 +683,7 @@ void BKE_sculptsession_free_vwpaint_data(struct SculptSession *ss) gmap = &ss->mode.vpaint.gmap; MEM_SAFE_FREE(ss->mode.vpaint.previous_color); + MEM_SAFE_FREE(ss->mode.vpaint.previous_accum); } else if (ss->mode_type == OB_MODE_WEIGHT_PAINT) { gmap = &ss->mode.wpaint.gmap; @@ -740,7 +741,10 @@ void BKE_sculptsession_bm_to_me_for_render(Object *object) */ BKE_object_free_derived_caches(object); - MEM_SAFE_FREE(object->sculpt->pbvh); + if (object->sculpt->pbvh) { + BKE_pbvh_free(object->sculpt->pbvh); + object->sculpt->pbvh = NULL; + } sculptsession_bm_to_me_update_data_only(object, false); |