diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-04 19:10:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-02-04 19:10:30 +0300 |
commit | 4925581820db4c0ddfe6e2fb818e4834509dfca0 (patch) | |
tree | 8d85b08dd3182cabb8accc229b6dc56bed4d0aaa /source/blender/blenkernel/intern/brush.c | |
parent | 4e8a8d1e8f59c2b97ce064d52fdab290ca8b2f3d (diff) |
Fix #25933: Drag Dog stroke method uses Jitter if set for other stroke method, but no jitter available.
Manually disable jitter usage for anchored and drag dot brush stroke metdhods.
Jitter slider is hidden in UI for this strokes so users can't set it to 0 by hand
and even if this slider would be visible in UI jitter gives wierd result for
this stroke methods.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index a78d2ecaaa2..b1931ebe0a7 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -907,7 +907,13 @@ static void brush_apply_pressure(BrushPainter *painter, Brush *brush, float pres void brush_jitter_pos(Brush *brush, float *pos, float *jitterpos) { - if(brush->jitter){ + int use_jitter= brush->jitter != 0; + + /* jitter-ed brush gives wierd and unpredictable result for this + kinds of stroke, so manyally disable jitter usage (sergey) */ + use_jitter&= (brush->flag & (BRUSH_RESTORE_MESH|BRUSH_ANCHORED)) == 0; + + if(use_jitter){ float rand_pos[2]; const int radius= brush_size(brush); const int diameter= 2*radius; |