From 5f95f7d2adb25ef7b821ec08f7f627664152d0b4 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Mon, 21 May 2012 23:32:46 +0000 Subject: Add input sample averaging to PaintStroke. Averages input samples to make the brush stroke smoother. Only mouse location is averaged right now, not pressure/tilt/etc. The DNA is in struct Paint.num_input_samples, RNA is Paint.input_samples. In combination with PaintStroke usage this change applies to sculpt, vpaint, and wpaint. The range of useful values varies quite a bit depending on input device; mouse needs higher values to match tablet pen, so set max samples pretty high (64). Release note section: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Sculpting#Input_Stroke_Averaging --- source/blender/makesrna/intern/rna_sculpt_paint.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c') diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index ad40e71eb71..58d676555c1 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -234,6 +234,11 @@ static void rna_def_paint(BlenderRNA *brna) prop = RNA_def_property(srna, "show_low_resolution", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_FAST_NAVIGATE); RNA_def_property_ui_text(prop, "Fast Navigate", "For multires, show low resolution while navigating the view"); + + prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_UNSIGNED); + RNA_def_property_int_sdna(prop, NULL, "num_input_samples"); + RNA_def_property_ui_range(prop, 1, PAINT_MAX_INPUT_SAMPLES, 0, 0); + RNA_def_property_ui_text(prop, "Input Samples", "Average multiple input samples together to smooth the brush stroke"); } static void rna_def_sculpt(BlenderRNA *brna) -- cgit v1.2.3