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:
Diffstat (limited to 'intern/cycles/blender/addon/ui.py')
-rw-r--r--intern/cycles/blender/addon/ui.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 6fd21db38ae..fd86d75a301 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -97,6 +97,11 @@ def use_cpu(context):
return (get_device_type(context) == 'NONE' or cscene.device == 'CPU')
+def use_metal(context):
+ cscene = context.scene.cycles
+
+ return (get_device_type(context) == 'METAL' and cscene.device == 'GPU')
+
def use_cuda(context):
cscene = context.scene.cycles