From 17e3f905e13f6424258668c8c15f248d56e60cc1 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sat, 25 Jul 2015 18:02:07 +0200 Subject: Style cleanup + fix sign on previous commit. --- source/blender/editors/sculpt_paint/sculpt.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/sculpt_paint/sculpt.c') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 26fe6856c0e..d03b5b4343d 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3458,19 +3458,20 @@ static void do_tiled(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSettings { SculptSession *ss = ob->sculpt; StrokeCache *cache = ss->cache; - const float * bbMin = ob->bb->vec[0]; - const float * bbMax = ob->bb->vec[6]; + const float radius = cache->radius; + const float *bbMin = ob->bb->vec[0]; + const float *bbMax = ob->bb->vec[6]; float start[3]; float end[3]; - const float * step = sd->paint.tile_offset; + const float *step = sd->paint.tile_offset; int dim; 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] - cache->radius) / step[dim]; + int n = (cache->location[dim] - bbMin[dim] + radius) / step[dim]; start[dim] = cache->location[dim] - n * step[dim]; - end[dim] = bbMax[dim] + cache->radius; + end[dim] = bbMax[dim] + radius; } else start[dim] = end[dim] = cache->location[dim]; -- cgit v1.2.3