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/makesdna
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/makesdna')
-rw-r--r--source/blender/makesdna/DNA_scene_types.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 83666068812..673156e3d7d 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -702,6 +702,8 @@ typedef struct TimeMarker {
/* *************************************************************** */
/* Paint Mode/Tool Data */
+#define PAINT_MAX_INPUT_SAMPLES 64
+
/* Paint Tool Base */
typedef struct Paint {
struct Brush *brush;
@@ -710,7 +712,14 @@ typedef struct Paint {
void *paint_cursor;
unsigned char paint_cursor_col[4];
+ /* enum PaintFlags */
int flags;
+
+ /* Paint stroke can use up to PAINT_MAX_INPUT_SAMPLES inputs to
+ * smooth the stroke */
+ int num_input_samples;
+
+ int pad;
} Paint;
/* ------------------------------------------- */