diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index d7e2d010f03..ca48524096a 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -188,13 +188,10 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode, ups->brush_rotation = 0.0f; } - if ((brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) { - ups->tex_mouse[0] = BLI_frand() * stroke->vc.ar->sizex; - ups->tex_mouse[1] = BLI_frand() * stroke->vc.ar->sizey;; - } - else { + if ((brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) + BKE_brush_randomize_texture_coordinates(ups); + else copy_v2_v2(ups->tex_mouse, mouse); - } } if (brush->flag & BRUSH_ANCHORED) { |