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/blenkernel/intern/brush.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/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 27c3df5ce6e..a64da8f6606 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -1399,20 +1399,14 @@ bool BKE_brush_use_locked_size(const Scene *scene, const Brush *brush)
(brush->flag & BRUSH_LOCK_SIZE);
}
-bool BKE_brush_use_size_pressure(const Scene *scene, const Brush *brush)
+bool BKE_brush_use_size_pressure(const Brush *brush)
{
- const short us_flag = scene->toolsettings->unified_paint_settings.flag;
-
- return (us_flag & UNIFIED_PAINT_SIZE) ? (us_flag & UNIFIED_PAINT_BRUSH_SIZE_PRESSURE) :
- (brush->flag & BRUSH_SIZE_PRESSURE);
+ return brush->flag & BRUSH_SIZE_PRESSURE;
}
-bool BKE_brush_use_alpha_pressure(const Scene *scene, const Brush *brush)
+bool BKE_brush_use_alpha_pressure(const Brush *brush)
{
- const short us_flag = scene->toolsettings->unified_paint_settings.flag;
-
- return (us_flag & UNIFIED_PAINT_ALPHA) ? (us_flag & UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE) :
- (brush->flag & BRUSH_ALPHA_PRESSURE);
+ return brush->flag & BRUSH_ALPHA_PRESSURE;
}
bool BKE_brush_sculpt_has_secondary_color(const Brush *brush)