diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-03-27 01:34:39 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-03-27 01:34:39 +0400 |
commit | 1942452ce52fa917198fee6f389f1bc7e4c620fe (patch) | |
tree | c0c8eb94447eee93bdea2e10fd3cc313546c7b01 /source/blender/editors/sculpt_paint/paint_image_2d.c | |
parent | 974d73bfbfbd3f10ad28c3da52e2a6cd84a3b8b8 (diff) |
Paint system:
Random texture mapping
* Support for 2d painting.
* Better random generation and useof the result.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_2d.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 9bc232c6a61..a45209de643 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -345,6 +345,7 @@ static void brush_painter_2d_refresh_cache(BrushPainter *painter, const float po const int diameter = 2 * BKE_brush_size_get(scene, brush); const float alpha = BKE_brush_alpha_get(scene, brush); const bool do_tiled = ELEM(brush->mtex.brush_map_mode, MTEX_MAP_MODE_TILED, MTEX_MAP_MODE_3D); + const bool do_random = brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM; float rotation = -mtex->rot; if (mtex->brush_map_mode == MTEX_MAP_MODE_VIEW) { @@ -354,7 +355,8 @@ static void brush_painter_2d_refresh_cache(BrushPainter *painter, const float po if (diameter != cache->lastsize || alpha != cache->lastalpha || brush->jitter != cache->lastjitter || - rotation != cache->last_rotation) + rotation != cache->last_rotation || + do_random) { if (cache->ibuf) { IMB_freeImBuf(cache->ibuf); |