diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-05-27 20:52:12 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-05-27 20:52:12 +0300 |
commit | 07def553d2ad948f128a6be390abbab726dc89f0 (patch) | |
tree | a00c774a5d1575520c255a66e396f4949267e3e1 /source/blender/editors/sculpt_paint/sculpt.c | |
parent | 9aea98d33cb1d3769532670ee194e466baf75f46 (diff) |
Fix T44745 non manifold edges of mesh do not work when smoothing in
multires.
Code had special guards for such edges to stop this from happening. I
don't see why this is needed though since code above assigns smoothed
positions for all vertices in the grid.
After removing the guards I saw that this in fact was the only place
where grd adjacency was used, so I completely removed it.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 19777e0093c..0e75a344699 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1764,7 +1764,6 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no SculptBrushTest test; CCGElem **griddata, *data; CCGKey key; - DMGridAdjacency *gridadj, *adj; float (*tmpgrid_co)[3], (*tmprow_co)[3]; float *tmpgrid_mask, *tmprow_mask; int v1, v2, v3, v4; @@ -1777,7 +1776,7 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no CLAMP(bstrength, 0.0f, 1.0f); BKE_pbvh_node_get_grids(ss->pbvh, node, &grid_indices, &totgrid, - NULL, &gridsize, &griddata, &gridadj); + NULL, &gridsize, &griddata); BKE_pbvh_get_grid_key(ss->pbvh, &key); grid_hidden = BKE_pbvh_grid_hidden(ss->pbvh); @@ -1796,7 +1795,6 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no int gi = grid_indices[i]; const BLI_bitmap *gh = grid_hidden[gi]; data = griddata[gi]; - adj = &gridadj[gi]; if (smooth_mask) memset(tmpgrid_mask, 0, sizeof(float) * gridsize * gridsize); @@ -1862,18 +1860,6 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no continue; } - if (x == 0 && adj->index[0] == -1) - continue; - - if (x == gridsize - 1 && adj->index[2] == -1) - continue; - - if (y == 0 && adj->index[3] == -1) - continue; - - if (y == gridsize - 1 && adj->index[1] == -1) - continue; - index = x + y * gridsize; co = CCG_elem_offset_co(&key, data, index); fno = CCG_elem_offset_no(&key, data, index); @@ -3701,7 +3687,7 @@ static void sculpt_omp_start(Sculpt *sd, SculptSession *ss) if (ss->multires) { int i, gridsize, array_mem_size; BKE_pbvh_node_get_grids(ss->pbvh, NULL, NULL, NULL, NULL, - &gridsize, NULL, NULL); + &gridsize, NULL); array_mem_size = cache->num_threads * sizeof(void *); |