Fix tile feature not working outside mesh boundaries.
authorAntony Riakiotakis <kalast@gmail.com>
Sat, 25 Jul 2015 14:21:09 +0000 (16:21 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Sat, 25 Jul 2015 14:21:09 +0000 (16:21 +0200)
We need to generate strokes up to a brush radius around the bounding
box.

source/blender/editors/sculpt_paint/sculpt.c

index 44de9e66d0c03c380ad8dba60358316987e97ee3..26fe6856c0e70a61b33714263c89992291301e8c 100644 (file)
@@ -3468,9 +3468,9 @@ static void do_tiled(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSettings
 
        for (dim = 0; dim < 3; ++dim) {
                if ((sd->paint.symmetry_flags & (PAINT_TILE_X << dim)) && step[dim] > 0) {
-                       int n = (cache->location[dim] - bbMin[dim]) / step[dim];
+                       int n = (cache->location[dim] - bbMin[dim] - cache->radius) / step[dim];
                        start[dim] = cache->location[dim] - n * step[dim];
-                       end[dim] = bbMax[dim];
+                       end[dim] = bbMax[dim] + cache->radius;
                }
                else
                        start[dim] = end[dim] = cache->location[dim];