9be01c209a90628e27e170d849aad3ebb5bb5494
[blender.git] / intern / cycles / blender / addon / presets.py
1 #
2 # Copyright 2011-2013 Blender Foundation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License
15 #
16
17 # <pep8 compliant>
18
19 from bl_operators.presets import AddPresetBase
20 from bpy.types import Operator
21
22
23 class AddPresetIntegrator(AddPresetBase, Operator):
24     '''Add an Integrator Preset'''
25     bl_idname = "render.cycles_integrator_preset_add"
26     bl_label = "Add Integrator Preset"
27     preset_menu = "CYCLES_MT_integrator_presets"
28
29     preset_defines = [
30         "cycles = bpy.context.scene.cycles"
31     ]
32
33     preset_values = [
34         "cycles.max_bounces",
35         "cycles.min_bounces",
36         "cycles.no_caustics",
37         "cycles.diffuse_bounces",
38         "cycles.glossy_bounces",
39         "cycles.transmission_bounces",
40         "cycles.transparent_min_bounces",
41         "cycles.transparent_max_bounces"
42     ]
43
44     preset_subdir = "cycles/integrator"
45
46
47 class AddPresetSampling(AddPresetBase, Operator):
48     '''Add a Sampling Preset'''
49     bl_idname = "render.cycles_sampling_preset_add"
50     bl_label = "Add Sampling Preset"
51     preset_menu = "CYCLES_MT_sampling_presets"
52
53     preset_defines = [
54         "cycles = bpy.context.scene.cycles"
55     ]
56
57     preset_values = [
58         "cycles.samples",
59         "cycles.preview_samples",
60         "cycles.aa_samples",
61         "cycles.preview_aa_samples",
62         "cycles.diffuse_samples",
63         "cycles.glossy_samples",
64         "cycles.transmission_samples",
65         "cycles.ao_samples",
66         "cycles.mesh_light_samples",
67         "cycles.subsurface_samples",
68         "cycles.no_caustics",
69         "cycles.blur_glossy",
70         "cycles.squared_samples",
71         "cycles.progressive"
72     ]
73
74     preset_subdir = "cycles/sampling"
75
76
77 def register():
78     pass
79
80
81 def unregister():
82     pass
83
84 if __name__ == "__main__":
85     register()