[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57768] trunk/blender/source/blender/ editors/sculpt_paint/sculpt.c: Fix #35583 Smooth brush ignores hidden parts
Antony Riakiotakis
kalast at gmail.com
Wed Jun 26 13:39:49 CEST 2013
Revision: 57768
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57768
Author: psy-fi
Date: 2013-06-26 11:39:48 +0000 (Wed, 26 Jun 2013)
Log Message:
-----------
Fix #35583 Smooth brush ignores hidden parts
The bug only exists for multires smoothing. Other cases were handled by
BKE_pbvh_vertex_iter_begin, which culled hidden parts accordingly. Added
a manual check on the multires smoothing code.
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c 2013-06-26 11:30:37 UTC (rev 57767)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c 2013-06-26 11:39:48 UTC (rev 57768)
@@ -1528,6 +1528,7 @@
float *tmpgrid_mask, *tmprow_mask;
int v1, v2, v3, v4;
int thread_num;
+ BLI_bitmap *grid_hidden;
int *grid_indices, totgrid, gridsize, i, x, y;
sculpt_brush_test_init(ss, &test);
@@ -1538,6 +1539,8 @@
NULL, &gridsize, &griddata, &gridadj);
BKE_pbvh_get_grid_key(ss->pbvh, &key);
+ grid_hidden = BKE_pbvh_grid_hidden(ss->pbvh);
+
thread_num = 0;
#ifdef _OPENMP
if (sd->flags & SCULPT_USE_OPENMP)
@@ -1549,8 +1552,10 @@
tmprow_mask = ss->cache->tmprow_mask[thread_num];
for (i = 0; i < totgrid; ++i) {
- data = griddata[grid_indices[i]];
- adj = &gridadj[grid_indices[i]];
+ int gi = grid_indices[i];
+ BLI_bitmap gh = grid_hidden[gi];
+ data = griddata[gi];
+ adj = &gridadj[gi];
if (smooth_mask)
memset(tmpgrid_mask, 0, sizeof(float) * gridsize * gridsize);
@@ -1611,6 +1616,11 @@
float *mask;
int index;
+ if (gh) {
+ if (BLI_BITMAP_GET(gh, y * gridsize + x))
+ continue;
+ }
+
if (x == 0 && adj->index[0] == -1)
continue;
More information about the Bf-blender-cvs
mailing list