diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-04 00:26:05 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-04 00:26:05 +0400 |
commit | ae585d59697b076e3c7e5492328a45defac03d86 (patch) | |
tree | 3f58815dab1137d2daaed0b8e4fe25f45b5f6f6a /source | |
parent | d0017e1813787a17548ce4a99007a61dbc0ca67f (diff) |
fix for last commit, (warning was without openmp only)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 509cde16e3e..32ed55854b6 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -267,7 +267,7 @@ typedef struct StrokeCache { /*** paint mesh ***/ -static void paint_mesh_restore_co(SculptSession *ss) +static void paint_mesh_restore_co(Sculpt *sd, SculptSession *ss) { StrokeCache *cache = ss->cache; int i; @@ -275,6 +275,10 @@ static void paint_mesh_restore_co(SculptSession *ss) PBVHNode **nodes; int n, totnode; +#ifndef _OPENMP + (void)sd; /* quied unused warning */ +#endif + BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) @@ -421,11 +425,11 @@ static int sculpt_brush_test_cube(SculptBrushTest *test, float co[3], float loca local_co[2] = fabs(local_co[2]); if (local_co[0] <= side && local_co[1] <= side && local_co[2] <= side) { - float p = 4; + float p = 4.0f; test->dist = ((powf(local_co[0], p) + powf(local_co[1], p) + - powf(local_co[2], p)) / pow(side, p)); + powf(local_co[2], p)) / powf(side, p)); return 1; } @@ -3373,7 +3377,7 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss) brush_use_size_pressure(ss->cache->vc->scene, brush)) || (brush->flag & BRUSH_RESTORE_MESH)) { - paint_mesh_restore_co(ss); + paint_mesh_restore_co(sd, ss); } } @@ -3592,7 +3596,7 @@ static int sculpt_brush_stroke_cancel(bContext *C, wmOperator *op) Sculpt *sd = CTX_data_tool_settings(C)->sculpt; if (ss->cache) { - paint_mesh_restore_co(ss); + paint_mesh_restore_co(sd, ss); } paint_stroke_cancel(C, op); |