From 09eb650da2f85307369871b74c652f5e9c3ff416 Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Mon, 10 Oct 2016 00:03:40 +0200 Subject: [PATCH] Bugfix: don't use gpu if the user doesn't want to --- src/com/sheepit/client/Job.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/sheepit/client/Job.java b/src/com/sheepit/client/Job.java index 0fb86af..80123a4 100644 --- a/src/com/sheepit/client/Job.java +++ b/src/com/sheepit/client/Job.java @@ -37,6 +37,7 @@ import java.util.List; import java.util.Map; import java.util.TimeZone; +import com.sheepit.client.Configuration.ComputeType; import com.sheepit.client.Error.Type; import com.sheepit.client.hardware.gpu.GPUDevice; import com.sheepit.client.os.OS; @@ -207,7 +208,7 @@ public class Job { gui.status("Rendering project \"" + this.name + "\""); RenderProcess process = getProcessRender(); String core_script = "import bpy\n" + "bpy.context.user_preferences.system.compute_device_type = \"%s\"\n" + "bpy.context.scene.cycles.device = \"%s\"\n" + "bpy.context.user_preferences.system.compute_device = \"%s\"\n"; - if (getUseGPU() && config.getGPUDevice() != null) { + if (getUseGPU() && config.getGPUDevice() != null && config.getComputeMethod() != ComputeType.CPU) { core_script = String.format(core_script, "CUDA", "GPU", config.getGPUDevice().getCudaName()); } else {