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_stroke.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_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index ee359def68c..fc0c6d748cb 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -336,7 +336,7 @@ static bool paint_brush_update(bContext *C,
ups->pixel_radius = BKE_brush_size_get(scene, brush);
- if (BKE_brush_use_size_pressure(scene, brush) && paint_supports_dynamic_size(brush, mode)) {
+ if (BKE_brush_use_size_pressure(brush) && paint_supports_dynamic_size(brush, mode)) {
ups->pixel_radius *= stroke->cached_size_pressure;
}
@@ -527,8 +527,8 @@ static void paint_brush_stroke_add_step(bContext *C,
* windows for some tablets, then we just skip first touch .. */
if (tablet && (pressure >= 0.99f) &&
((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) ||
- BKE_brush_use_alpha_pressure(scene, pop->s.brush) ||
- BKE_brush_use_size_pressure(scene, pop->s.brush))) {
+ BKE_brush_use_alpha_pressure(pop->s.brush) ||
+ BKE_brush_use_size_pressure(pop->s.brush))) {
return;
}
@@ -540,8 +540,8 @@ static void paint_brush_stroke_add_step(bContext *C,
* which is the sensitivity of the most sensitive pen tablet available */
if (tablet && (pressure < 0.0002f) &&
((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) ||
- BKE_brush_use_alpha_pressure(scene, pop->s.brush) ||
- BKE_brush_use_size_pressure(scene, pop->s.brush))) {
+ BKE_brush_use_alpha_pressure(pop->s.brush) ||
+ BKE_brush_use_size_pressure(pop->s.brush))) {
return;
}
#endif
@@ -756,7 +756,7 @@ static float paint_space_stroke_spacing_variable(bContext *C,
float dpressure,
float length)
{
- if (BKE_brush_use_size_pressure(scene, stroke->brush)) {
+ if (BKE_brush_use_size_pressure(stroke->brush)) {
/* use pressure to modify size. set spacing so that at 100%, the circles
* are aligned nicely with no overlap. for this the spacing needs to be
* the average of the previous and next size. */