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:
authorJacques Lucke <mail@jlucke.com>2019-04-23 13:31:37 +0300
committerJacques Lucke <mail@jlucke.com>2019-04-23 13:31:37 +0300
commitc043ab1cf3bce77248a8d7dfa42b2e9f8f9611aa (patch)
treef40b4fc2a457ab194ebcf942845943c8b49f854c /source/blender
parent32fe79b9ee88c8f91fefc1a2db55e86a81e8245c (diff)
Fix T63233: Set default blur kernel radius to 2.
Reviewers: jbakker Differential Revision: https://developer.blender.org/D4722
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/brush.c3
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c4
-rw-r--r--source/blender/makesrna/intern/rna_brush.c1
3 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 4ee3abcafeb..dcca6e2bf84 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -140,6 +140,9 @@ void BKE_brush_init(Brush *brush)
brush->sculpt_tool = SCULPT_TOOL_DRAW; /* sculpting defaults to the draw tool for new brushes */
+ /* A kernel radius of 1 has almost no effect (T63233). */
+ brush->blur_kernel_radius = 2;
+
/* the default alpha falloff curve */
BKE_brush_curve_preset(brush, CURVE_PRESET_SMOOTH);
}
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index c5263708f43..b5b86224644 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -353,4 +353,8 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
copy_v2_fl2(scene->safe_areas.title, 0.1f, 0.05f);
copy_v2_fl2(scene->safe_areas.action, 0.035f, 0.035f);
}
+
+ for (Brush *brush = bmain->brushes.first; brush; brush = brush->id.next) {
+ brush->blur_kernel_radius = 2;
+ }
}
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index e2ff6935e43..6dc5a9cfd6a 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1840,6 +1840,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop = RNA_def_property(srna, "blur_kernel_radius", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "blur_kernel_radius");
RNA_def_property_range(prop, 1, 10000);
+ RNA_def_property_int_default(prop, 2);
RNA_def_property_ui_range(prop, 1, 50, 1, -1);
RNA_def_property_ui_text(
prop, "Kernel Radius", "Radius of kernel used for soften and sharpen in pixels");