diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2014-03-29 01:37:05 +0400 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2014-03-29 01:37:05 +0400 |
commit | 00a9e77259528d7e4d74101546e17a2396deac39 (patch) | |
tree | ccdc601469450de026c3936be0c7968dae290c93 /source/blender/editors/sculpt_paint/sculpt.c | |
parent | 6d973b87a6c0351510603b118814618333318321 (diff) |
Fix compiling sculpt without OpenMP available
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 9dbf76b61a9..803869fa505 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -945,6 +945,7 @@ static float tex_strength(SculptSession *ss, Brush *br, MTex *mtex = &br->mtex; float avg = 1; float rgba[4]; + int thread_num; if (!mtex->tex) { avg = 1; @@ -987,7 +988,12 @@ static float tex_strength(SculptSession *ss, Brush *br, x += br->mtex.ofs[0]; y += br->mtex.ofs[1]; - avg = paint_get_tex_pixel(&br->mtex, x, y, ss->tex_pool, omp_get_thread_num()); + thread_num = 0; +#ifdef _OPENMP + if (sd->flags & SCULPT_USE_OPENMP) + thread_num = omp_get_thread_num(); +#endif + avg = paint_get_tex_pixel(&br->mtex, x, y, ss->tex_pool, thread_num); avg += br->texture_sample_bias; } |