2 # Copyright 2011, Blender Foundation.
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 from cycles import engine
22 available_devices = engine.available_devices()
23 cuda = 'cuda' in available_devices
24 opencl = 'opencl' in available_devices
27 elif cuda and not opencl:
28 gpu_string = "CUDA GPU"
30 gpu_string = "OpenCL GPU"
35 ("CPU", "CPU", "Processor"),
36 ("GPU", get_gpu_device(), "Graphics card"))
39 ("CUDA", "CUDA", "NVidia only"),
40 ("OPENCL", "OpenCL (incomplete)", ""))
43 ("GPU_COMPATIBLE", "GPU Compatible", "Restricted shading system compatible with GPU rendering"),
44 ("OSL", "Open Shading Language", "Open Shading Language shading system that only runs on the CPU"))
46 displacement_methods = (
47 ("BUMP", "Bump", "Bump mapping to simulate the appearance of displacement"),
48 ("TRUE", "True", "Use true displacement only, requires fine subdivision"),
49 ("BOTH", "Both", "Combination of displacement and bump mapping"))
52 ("DYNAMIC_BVH", "Dynamic BVH", "Objects can be individually updated, at the cost of slower render time"),
53 ("STATIC_BVH", "Static BVH", "Any object modification requires a complete BVH rebuild, but renders faster"))
56 ("BOX", "Box", "Box filter"),
57 ("GAUSSIAN", "Gaussian", "Gaussian filter"))