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 18:36:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-29 18:36:41 +0300
commit41e2dbaea96099ea4f75e866a683af430e9b2ae9 (patch)
treea342a477252bcbbee20cee7e6025219900be5321 /source/blender/blenkernel
parentd4f8e4e30cae6854351e44ded4ab7673c522d502 (diff)
Weight Paint: accumulate support
- Clamp accumulate so it doesn't exceed brush strength. - Was multiplying by brush strength twice.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_paint.h4
-rw-r--r--source/blender/blenkernel/intern/paint.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 015fd7c8a14..6cae8d28947 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -220,14 +220,14 @@ typedef struct SculptSession {
/* For non-airbrush painting to re-apply from the original (MLoop aligned). */
unsigned int *previous_color;
- unsigned int *previous_accum;
+ float *previous_accum;
} vpaint;
struct {
struct SculptVertexPaintGeomMap gmap;
/* Vertex aligned arrays of weights. */
- /* For non-airbrush painting to re-apply from the original. */
+ float *previous_accum;
float *previous_weight;
/* Keep track of how much each vertex has been painted (non-airbrush only). */
float *alpha_weight;
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 05d53ae4771..849fb5c6b5a 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -687,6 +687,7 @@ void BKE_sculptsession_free_vwpaint_data(struct SculptSession *ss)
MEM_SAFE_FREE(ss->mode.wpaint.alpha_weight);
MEM_SAFE_FREE(ss->mode.wpaint.previous_weight);
+ MEM_SAFE_FREE(ss->mode.wpaint.previous_accum);
}
else {
return;