Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-06-23 20:47:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-06-23 20:47:15 +0400
commit8b9503e0ecb9c1f524278df0fafda409425b21da (patch)
tree595dae7ff1977a65bb66175cc9edc23706d49dd0 /source/blender
parent75e22a1917fb638a67d475b224cb6e368e821783 (diff)
bugfix [#14796] -t <threads> command line switch doesn't work unless FIXED_THREADS has previously been turned on
Command line threads now override blendfile setting in background mode. Command line Threads greater then 8 are now clamped.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/render/intern/source/pipeline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index ebb52c49132..6a0af82b4d7 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2675,9 +2675,9 @@ void RE_set_max_threads(int threads)
void RE_init_threadcount(Render *re)
{
- if ((re->r.mode & R_FIXED_THREADS)==0 || commandline_threads == 0) { /* Automatic threads */
+ if(commandline_threads >= 1) { /* only set as an arg in background mode */
+ re->r.threads= MIN2(commandline_threads, BLENDER_MAX_THREADS);
+ } else if ((re->r.mode & R_FIXED_THREADS)==0 || commandline_threads == 0) { /* Automatic threads */
re->r.threads = BLI_system_thread_count();
- } else if(commandline_threads >= 1 && commandline_threads<=BLENDER_MAX_THREADS) {
- re->r.threads= commandline_threads;
}
}