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:
authorPablo Dobarro <pablodp606@gmail.com>2019-11-27 04:02:18 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-11-27 19:17:46 +0300
commit9251b077203c763f1be83505ed0a4d1e19dab947 (patch)
tree1386056411e0a98e7ab0c116f6df6df515b34dda /source/blender/editors/sculpt_paint/paint_vertex.c
parent0e4014ef9215ffe38108b7596a29bd3c5c41bbd1 (diff)
Sculpt/Paint: Remove Unified SIZE_PRESSURE and ALPHA_PRESSURE
The relation between the pressure/size and the pressure/alpha is a fundamental property that defines the behavior of a brush, so it does not make sense to have it unified across all brushes. This applies both for sculpting and painting. Some of the new 2.82 brushes need pressure/size or pressure/alpha to be enabled to work propely, while others don't. Users should not be switching on and off this property manually when changing brushes if they want to use unified size. This is also causing that some users are using the brushes with an incorrect configuration. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6291
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index ac7cf310099..536d93cac29 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1522,7 +1522,7 @@ static void vwpaint_update_cache_variants(bContext *C, VPaint *vp, Object *ob, P
}
}
- if (BKE_brush_use_size_pressure(scene, brush) &&
+ if (BKE_brush_use_size_pressure(brush) &&
paint_supports_dynamic_size(brush, PAINT_MODE_SCULPT)) {
cache->radius = cache->initial_radius * cache->pressure;
}
@@ -1684,11 +1684,9 @@ static void get_brush_alpha_data(const Scene *scene,
float *r_brush_alpha_pressure)
{
*r_brush_size_pressure = BKE_brush_size_get(scene, brush) *
- (BKE_brush_use_size_pressure(scene, brush) ? ss->cache->pressure :
- 1.0f);
+ (BKE_brush_use_size_pressure(brush) ? ss->cache->pressure : 1.0f);
*r_brush_alpha_value = BKE_brush_alpha_get(scene, brush);
- *r_brush_alpha_pressure = (BKE_brush_use_alpha_pressure(scene, brush) ? ss->cache->pressure :
- 1.0f);
+ *r_brush_alpha_pressure = (BKE_brush_use_alpha_pressure(brush) ? ss->cache->pressure : 1.0f);
}
static float wpaint_get_active_weight(const MDeformVert *dv, const WeightPaintInfo *wpi)