diff options
author | Ton Roosendaal <ton@blender.org> | 2011-01-11 17:01:23 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-01-11 17:01:23 +0300 |
commit | 52a470041e93c6d95863145791824379c92b9f03 (patch) | |
tree | 6c7ceaf32c37593d1db524a15075fbe1a29fbcc6 /source/blender/editors/sculpt_paint | |
parent | 8397e3e476479a0ec23bd8aacccd58d00f040d07 (diff) |
Bugfix #25581
Pressure sensitivity for Sculpt 'strength' got lost in code cleanup.
Added warning in code, the function call is confusing.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 15bb574448f..f6136bced94 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -766,9 +766,12 @@ static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const if(length > FLT_EPSILON) { int steps; int i; - float pressure; + float pressure= 1.0f; - pressure = event_tablet_data(event, NULL); + /* XXX mysterious :) what has 'use size' do with this here... if you don't check for it, pressure fails */ + if(brush_use_size_pressure(stroke->brush)) + pressure = event_tablet_data(event, NULL); + if(pressure > FLT_EPSILON) { scale = (brush_size(stroke->brush)*pressure*stroke->brush->spacing/50.0f) / length; if(scale > FLT_EPSILON) { |