Cycles / Sampling Presets:
[blender-staging.git] / intern / cycles / blender / addon / presets.py
1 #
2 # Copyright 2011, Blender Foundation.
3 #
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.
8 #
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.
13 #
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.
17 #
18
19 # <pep8 compliant>
20
21 from bl_operators.presets import AddPresetBase
22 from bpy.types import Operator
23
24
25 class AddPresetIntegrator(AddPresetBase, Operator):
26     '''Add an Integrator Preset'''
27     bl_idname = "render.cycles_integrator_preset_add"
28     bl_label = "Add Integrator Preset"
29     preset_menu = "CYCLES_MT_integrator_presets"
30
31     preset_defines = [
32         "cycles = bpy.context.scene.cycles"
33     ]
34
35     preset_values = [
36         "cycles.max_bounces",
37         "cycles.min_bounces",
38         "cycles.no_caustics",
39         "cycles.diffuse_bounces",
40         "cycles.glossy_bounces",
41         "cycles.transmission_bounces",
42         "cycles.transparent_min_bounces",
43         "cycles.transparent_max_bounces"
44     ]
45
46     preset_subdir = "cycles/integrator"
47
48
49 class AddPresetSampling(AddPresetBase, Operator):
50     '''Add a Sampling Preset'''
51     bl_idname = "render.cycles_sampling_preset_add"
52     bl_label = "Add Sampling Preset"
53     preset_menu = "CYCLES_MT_sampling_presets"
54
55     preset_defines = [
56         "cycles = bpy.context.scene.cycles"
57     ]
58
59     preset_values = [
60         "cycles.samples",
61         "cycles.preview_samples",
62         "cycles.aa_samples",
63         "cycles.preview_aa_samples",
64         "cycles.diffuse_samples",
65         "cycles.glossy_samples",
66         "cycles.transmission_samples",
67         "cycles.ao_samples",
68         "cycles.mesh_light_samples",
69         "cycles.subsurface_samples",
70         "cycles.no_caustics",
71         "cycles.blur_glossy",
72         "cycles.squared_samples",
73         "cycles.progressive"
74     ]
75
76     preset_subdir = "cycles/sampling"
77
78
79 def register():
80     pass
81
82
83 def unregister():
84     pass
85
86 if __name__ == "__main__":
87     register()