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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-01-15 17:48:44 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2011-01-15 17:48:44 +0300
commitc6abe115129651abd80aa361ca9bf717cf81c382 (patch)
treec6d9647d16f38bad13fee13e1e9666cd7edae071 /source/blender/editors/sculpt_paint/sculpt.c
parent384025f1a0ceaadfd1d623cc61f25d7426301a5b (diff)
IRC bugreport fix: thumb brush works incorrect when using tablet by Dan McGrath (troubled)
Quite silly fix, not sure if it could be smarter with current events/brushes design. Use pressure_value from first brush step for brushes which don't support strokes -- thumb. brush, brushes with anchored stroke method. Should be fixed in nicer way after events redesigning. P.S. Tried to place pressure saving into invaliants update fuunction, but it seens that this function wouldn't know about pressure yet.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index a14811face8..58398bd1f5c 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2916,7 +2916,13 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, SculptSession
cache->pen_flip = RNA_boolean_get(ptr, "pen_flip");
RNA_float_get_array(ptr, "mouse", cache->mouse);
- cache->pressure = RNA_float_get(ptr, "pressure");
+ /* XXX: Use preassure value from first brush step for brushes which don't
+ support strokes (grab, thumb). They depends on initial state and
+ brush coord/pressure/etc.
+ It's more an events design issue, which doesn't split coordinate/pressure/angle
+ changing events. We should avoid this after events system re-design */
+ if(paint_space_stroke_enabled(brush) || cache->first_time)
+ cache->pressure = RNA_float_get(ptr, "pressure");
/* Truly temporary data that isn't stored in properties */