Fix T63233: Set default blur kernel radius to 2.
Reviewers: jbakker Differential Revision: https://developer.blender.org/D4722
This commit is contained in:
parent
32fe79b9ee
commit
c043ab1cf3
Notes:
blender-bot
2023-12-22 20:14:11 +01:00
Referenced by issue #63233, soften brush not working in UV editor for texturing
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue