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>2019-10-01 20:32:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-10-01 20:37:29 +0300
commit72666ae3e7b7854429cb297d767833fd41bac812 (patch)
treebec8eddc6735e864e6eec7dadf76516532c5739d /source/blender
parent710e4847a0d2c6f18262b928faae9288bd41ad4e (diff)
Brush: default the strength to 1.0
This applies to all paint modes except sculpt and grease pencil brushes. When painting color or weight it's best to paint the color the user has selected, without them having to make multiple strokes.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/brush.c4
-rw-r--r--source/blender/blenloader/intern/versioning_250.c2
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c10
-rw-r--r--source/blender/makesdna/DNA_brush_defaults.h2
4 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 95d3f47c38c..4187dfa68ad 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -895,6 +895,10 @@ void BKE_brush_sculpt_reset(Brush *br)
/* Use the curve presets by default */
br->curve_preset = BRUSH_CURVE_SMOOTH;
+ /* Note that sculpt defaults where set when 0.5 was the default (now it's 1.0)
+ * assign this so logic below can remain the same. */
+ br->alpha = 0.5f;
+
/* Brush settings */
switch (br->sculpt_tool) {
case SCULPT_TOOL_DRAW_SHARP:
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index 0a3e592bb15..72013bc6eed 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -1696,7 +1696,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
/* will have no effect */
if (brush->alpha == 0) {
- brush->alpha = 0.5f;
+ brush->alpha = 1.0f;
}
/* bad radius */
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 24c9a7c4147..c9fb8b6990b 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -428,6 +428,13 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
for (Brush *brush = bmain->brushes.first; brush; brush = brush->id.next) {
brush->blur_kernel_radius = 2;
+
+ /* Use full strength for all non-sculpt brushes,
+ * when painting we want to use full color/weight always.
+ *
+ * Note that sculpt is an exception,
+ * it's values are overwritten by #BKE_brush_sculpt_reset below. */
+ brush->alpha = 1.0;
}
{
@@ -475,7 +482,8 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
/* Use the same tool icon color in the brush cursor */
for (brush = bmain->brushes.first; brush; brush = brush->id.next) {
- if (brush->sculpt_tool) {
+ if (brush->ob_mode & OB_MODE_SCULPT) {
+ BLI_assert(brush->sculpt_tool != 0);
BKE_brush_sculpt_reset(brush);
}
}
diff --git a/source/blender/makesdna/DNA_brush_defaults.h b/source/blender/makesdna/DNA_brush_defaults.h
index cf4e74dfd41..714c205cda2 100644
--- a/source/blender/makesdna/DNA_brush_defaults.h
+++ b/source/blender/makesdna/DNA_brush_defaults.h
@@ -40,7 +40,7 @@
/* BRUSH SCULPT TOOL SETTINGS */ \
.weight = 1.0f, /* weight of brush 0 - 1.0 */ \
.size = 35, /* radius of the brush in pixels */ \
- .alpha = 0.5f, /* brush strength/intensity probably variable should be renamed? */ \
+ .alpha = 1.0f, /* brush strength/intensity probably variable should be renamed? */ \
.autosmooth_factor = 0.0f, \
.topology_rake_factor = 0.0f, \
.crease_pinch_factor = 0.5f, \