diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 495b2f21f7b..5f3406ec8a4 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -60,6 +60,20 @@ def use_cpu(context): return (device_type == 'NONE' or cscene.device == 'CPU') +def use_opencl(context): + cscene = context.scene.cycles + device_type = context.user_preferences.system.compute_device_type + + return (device_type == 'OPENCL' and cscene.device == 'GPU') + + +def use_cuda(context): + cscene = context.scene.cycles + device_type = context.user_preferences.system.compute_device_type + + return (device_type == 'CUDA' and cscene.device == 'GPU') + + def use_branched_path(context): cscene = context.scene.cycles device_type = context.user_preferences.system.compute_device_type