From a07dcd67ebf63fad08536b1e78bbb61e18fa51e6 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 8 May 2013 13:23:17 +0000 Subject: Fix #35240: command line -t number of threads option did not work for cycles. Now it works for blender internal, cycles and other multithreading code in Blender in both background and UI mode. --- source/blender/editors/sculpt_paint/paint_image_proj.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 3dff3c7846a..7523d10996a 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3047,12 +3047,8 @@ static void project_paint_begin(ProjPaintState *ps) * threads is being able to fill in multiple buckets at once. * Only use threads for bigger brushes. */ - if (ps->scene->r.mode & R_FIXED_THREADS) { - ps->thread_tot = ps->scene->r.threads; - } - else { - ps->thread_tot = BLI_system_thread_count(); - } + ps->thread_tot = BKE_scene_num_threads(ps->scene); + for (a = 0; a < ps->thread_tot; a++) { ps->arena_mt[a] = BLI_memarena_new(1 << 16, "project paint arena"); } -- cgit v1.2.3