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:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-05-22 03:32:46 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-05-22 03:32:46 +0400
commit5f95f7d2adb25ef7b821ec08f7f627664152d0b4 (patch)
treeb8c09433c0e386f161d3937aaa0c253e20b1b7a1 /source/blender/blenloader
parentb951c2be7f26caea266e3a27d9701b0374bdcad5 (diff)
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
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index c5ecaf8d49a..c1942144ece 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4897,8 +4897,10 @@ static void link_recurs_seq(FileData *fd, ListBase *lb)
static void direct_link_paint(FileData *fd, Paint **paint)
{
-/* TODO. is this needed */
+ /* TODO. is this needed */
(*paint) = newdataadr(fd, (*paint));
+ if (*paint && (*paint)->num_input_samples < 1)
+ (*paint)->num_input_samples = 1;
}
static void direct_link_scene(FileData *fd, Scene *sce)