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:
authorCampbell Barton <ideasman42@gmail.com>2017-09-29 10:10:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-29 11:06:52 +0300
commit288b2d0aa6bc8097f92e85f8d16fd2125d6eb2e9 (patch)
treeab8d3e4efced84746d8c2ffb0ee5608d48d50e54 /source/blender/blenkernel/intern/paint.c
parent97eefc1fd9069794cbfbba23de01fc1813f738d7 (diff)
Vertex Paint: Alpha Support
GSOC 2017 by Darshan Kadu, see: D2859. This is a partial merge of some of the features from the soc-2017-vertex_paint branch. - Alpha painting & drawing. - 10 new color blending modes. - Support for vertex select in vertex paint mode.
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r--source/blender/blenkernel/intern/paint.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 25ea6ad079f..05d53ae4771 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -466,7 +466,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)
);
}
@@ -680,6 +680,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;
@@ -737,7 +738,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);