diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 10 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_brush_defaults.h | 2 |
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, \ |