Cycles: Render Passes
[blender.git] / intern / cycles / blender / addon / ui.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 import bpy
22
23 from bpy.types import Panel, Menu
24
25 from . import enums, engine
26
27
28 class CYCLES_MT_integrator_presets(Menu):
29     bl_label = "Integrator Presets"
30     preset_subdir = "cycles/integrator"
31     preset_operator = "script.execute_preset"
32     COMPAT_ENGINES = {'CYCLES'}
33     draw = Menu.draw_preset
34
35
36 class CyclesButtonsPanel():
37     bl_space_type = "PROPERTIES"
38     bl_region_type = "WINDOW"
39     bl_context = "render"
40
41     @classmethod
42     def poll(cls, context):
43         rd = context.scene.render
44         return rd.engine == 'CYCLES'
45
46
47 class CyclesRender_PT_integrator(CyclesButtonsPanel, Panel):
48     bl_label = "Integrator"
49     bl_options = {'DEFAULT_CLOSED'}
50
51     def draw(self, context):
52         layout = self.layout
53
54         scene = context.scene
55         cscene = scene.cycles
56
57         row = layout.row(align=True)
58         row.menu("CYCLES_MT_integrator_presets", text=bpy.types.CYCLES_MT_integrator_presets.bl_label)
59         row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMIN")
60         row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMOUT").remove_active = True
61
62         split = layout.split()
63
64         col = split.column()
65         sub = col.column(align=True)
66         sub.label(text="Samples:")
67         sub.prop(cscene, "samples", text="Render")
68         sub.prop(cscene, "preview_samples", text="Preview")
69         sub.prop(cscene, "seed")
70
71         sub = col.column(align=True)
72         sub.label("Transparency:")
73         sub.prop(cscene, "transparent_max_bounces", text="Max")
74         sub.prop(cscene, "transparent_min_bounces", text="Min")
75         sub.prop(cscene, "use_transparent_shadows", text="Shadows")
76
77         col = split.column()
78
79         sub = col.column(align=True)
80         sub.label(text="Bounces:")
81         sub.prop(cscene, "max_bounces", text="Max")
82         sub.prop(cscene, "min_bounces", text="Min")
83
84         sub = col.column(align=True)
85         sub.label(text="Light Paths:")
86         sub.prop(cscene, "diffuse_bounces", text="Diffuse")
87         sub.prop(cscene, "glossy_bounces", text="Glossy")
88         sub.prop(cscene, "transmission_bounces", text="Transmission")
89         sub.prop(cscene, "no_caustics")
90
91         #row = col.row()
92         #row.prop(cscene, "blur_caustics")
93         #row.active = not cscene.no_caustics
94
95
96 class CyclesRender_PT_film(CyclesButtonsPanel, Panel):
97     bl_label = "Film"
98
99     def draw(self, context):
100         layout = self.layout
101
102         scene = context.scene
103         cscene = scene.cycles
104
105         split = layout.split()
106
107         col = split.column()
108         col.prop(cscene, "film_exposure")
109         col.prop(cscene, "film_transparent")
110
111         col = split.column()
112         sub = col.column(align=True)
113         sub.prop(cscene, "filter_type", text="")
114         if cscene.filter_type != 'BOX':
115             sub.prop(cscene, "filter_width", text="Width")
116
117
118 class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
119     bl_label = "Performance"
120     bl_options = {'DEFAULT_CLOSED'}
121
122     def draw(self, context):
123         layout = self.layout
124
125         scene = context.scene
126         rd = scene.render
127         cscene = scene.cycles
128
129         split = layout.split()
130
131         col = split.column(align=True)
132
133         col.label(text="Threads:")
134         col.row().prop(rd, "threads_mode", expand=True)
135         sub = col.column()
136         sub.enabled = rd.threads_mode == 'FIXED'
137         sub.prop(rd, "threads")
138
139         sub = col.column(align=True)
140         sub.label(text="Tiles:")
141         sub.prop(cscene, "debug_tile_size")
142         sub.prop(cscene, "debug_min_size")
143
144         col = split.column()
145
146         sub = col.column(align=True)
147         sub.label(text="Acceleration structure:")
148         sub.prop(cscene, "debug_bvh_type", text="")
149         sub.prop(cscene, "debug_use_spatial_splits")
150         sub.prop(cscene, "use_cache")
151
152
153 class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
154     bl_label = "Layers"
155     bl_options = {'DEFAULT_CLOSED'}
156     COMPAT_ENGINES = {'BLENDER_RENDER'}
157
158     def draw(self, context):
159         layout = self.layout
160
161         scene = context.scene
162         rd = scene.render
163
164         row = layout.row()
165         row.template_list(rd, "layers", rd.layers, "active_index", rows=2)
166
167         col = row.column(align=True)
168         col.operator("scene.render_layer_add", icon='ZOOMIN', text="")
169         col.operator("scene.render_layer_remove", icon='ZOOMOUT', text="")
170
171         row = layout.row()
172         rl = rd.layers.active
173         row.prop(rl, "name")
174         row.prop(rd, "use_single_layer", text="", icon_only=True)
175
176         split = layout.split()
177
178         col = split.column()
179         col.prop(scene, "layers", text="Scene")
180
181         col = split.column()
182         col.prop(rl, "layers", text="Layer")
183
184         layout.separator()
185
186         split = layout.split()
187
188         col = split.column()
189         col.label(text="Passes:")
190         col.prop(rl, "use_pass_combined")
191         col.prop(rl, "use_pass_z")
192         col.prop(rl, "use_pass_normal")
193         col.prop(rl, "use_pass_object_index")
194         col.prop(rl, "use_pass_material_index")
195         col.prop(rl, "use_pass_emit")
196         col.prop(rl, "use_pass_environment")
197
198         col = split.column()
199         col.label()
200         col.label(text="Diffuse:")
201         row = col.row(align=True)
202         row.prop(rl, "use_pass_diffuse_direct", text="Direct", toggle=True)
203         row.prop(rl, "use_pass_diffuse_indirect", text="Indirect", toggle=True)
204         row.prop(rl, "use_pass_diffuse_color", text="Color", toggle=True)
205         col.label(text="Glossy:")
206         row = col.row(align=True)
207         row.prop(rl, "use_pass_glossy_direct", text="Direct", toggle=True)
208         row.prop(rl, "use_pass_glossy_indirect", text="Indirect", toggle=True)
209         row.prop(rl, "use_pass_glossy_color", text="Color", toggle=True)
210         col.label(text="Transmission:")
211         row = col.row(align=True)
212         row.prop(rl, "use_pass_transmission_direct", text="Direct", toggle=True)
213         row.prop(rl, "use_pass_transmission_indirect", text="Indirect", toggle=True)
214         row.prop(rl, "use_pass_transmission_color", text="Color", toggle=True)
215
216         layout.separator()
217
218         rl = rd.layers[0]
219         layout.prop(rl, "material_override", text="Material")
220
221
222 class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
223     bl_label = "Post Processing"
224     bl_options = {'DEFAULT_CLOSED'}
225
226     def draw(self, context):
227         layout = self.layout
228
229         rd = context.scene.render
230
231         split = layout.split()
232
233         col = split.column()
234         col.prop(rd, "use_compositing")
235         col.prop(rd, "use_sequencer")
236
237         col = split.column()
238         col.prop(rd, "dither_intensity", text="Dither", slider=True)
239
240
241 class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
242     bl_label = "Depth of Field"
243     bl_context = "data"
244
245     @classmethod
246     def poll(cls, context):
247         return context.camera and CyclesButtonsPanel.poll(context)
248
249     def draw(self, context):
250         layout = self.layout
251
252         cam = context.camera
253         ccam = cam.cycles
254
255         split = layout.split()
256
257         col = split.column()
258         col.label("Focus:")
259         col.prop(cam, "dof_object", text="")
260
261         sub = col.row()
262         sub.active = cam.dof_object is None
263         sub.prop(cam, "dof_distance", text="Distance")
264
265         col = split.column()
266
267         col.label("Aperture:")
268         col.prop(ccam, "aperture_size", text="Size")
269
270         sub = col.column(align=True)
271         sub.prop(ccam, "aperture_blades", text="Blades")
272         sub.prop(ccam, "aperture_rotation", text="Rotation")
273
274
275 class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
276     bl_label = ""
277     bl_context = "material"
278     bl_options = {'HIDE_HEADER'}
279
280     @classmethod
281     def poll(cls, context):
282         return (context.material or context.object) and CyclesButtonsPanel.poll(context)
283
284     def draw(self, context):
285         layout = self.layout
286
287         mat = context.material
288         ob = context.object
289         slot = context.material_slot
290         space = context.space_data
291
292         if ob:
293             row = layout.row()
294
295             row.template_list(ob, "material_slots", ob, "active_material_index", rows=2)
296
297             col = row.column(align=True)
298             col.operator("object.material_slot_add", icon='ZOOMIN', text="")
299             col.operator("object.material_slot_remove", icon='ZOOMOUT', text="")
300
301             col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")
302
303             if ob.mode == 'EDIT':
304                 row = layout.row(align=True)
305                 row.operator("object.material_slot_assign", text="Assign")
306                 row.operator("object.material_slot_select", text="Select")
307                 row.operator("object.material_slot_deselect", text="Deselect")
308
309         split = layout.split(percentage=0.65)
310
311         if ob:
312             split.template_ID(ob, "active_material", new="material.new")
313             row = split.row()
314
315             if slot:
316                 row.prop(slot, "link", text="")
317             else:
318                 row.label()
319         elif mat:
320             split.template_ID(space, "pin_id")
321             split.separator()
322
323
324 class Cycles_PT_mesh_displacement(CyclesButtonsPanel, Panel):
325     bl_label = "Displacement"
326     bl_context = "data"
327
328     @classmethod
329     def poll(cls, context):
330         if CyclesButtonsPanel.poll(context):
331             if context.mesh or context.curve or context.meta_ball:
332                 if context.scene.cycles.feature_set == 'EXPERIMENTAL':
333                     return True
334
335         return False
336
337     def draw(self, context):
338         layout = self.layout
339
340         mesh = context.mesh
341         curve = context.curve
342         mball = context.meta_ball
343
344         if mesh:
345             cdata = mesh.cycles
346         elif curve:
347             cdata = curve.cycles
348         elif mball:
349             cdata = mball.cycles
350
351         layout.prop(cdata, "displacement_method", text="Method")
352         layout.prop(cdata, "use_subdivision")
353         layout.prop(cdata, "dicing_rate")
354
355
356 class CyclesObject_PT_ray_visibility(CyclesButtonsPanel, Panel):
357     bl_label = "Ray Visibility"
358     bl_context = "object"
359     bl_options = {'DEFAULT_CLOSED'}
360
361     @classmethod
362     def poll(cls, context):
363         ob = context.object
364         return CyclesButtonsPanel.poll(context) and ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META'}  # todo: 'LAMP'
365
366     def draw(self, context):
367         layout = self.layout
368
369         ob = context.object
370         visibility = ob.cycles_visibility
371
372         flow = layout.column_flow()
373         
374         flow.prop(visibility, "camera")
375         flow.prop(visibility, "diffuse")
376         flow.prop(visibility, "glossy")
377         flow.prop(visibility, "transmission")
378         flow.prop(visibility, "shadow")
379
380
381 def find_node(material, nodetype):
382     if material and material.node_tree:
383         ntree = material.node_tree
384
385         for node in ntree.nodes:
386             if getattr(node, "type", None) == nodetype:
387                 return node
388
389     return None
390
391
392 def find_node_input(node, name):
393     for input in node.inputs:
394         if input.name == name:
395             return input
396
397     return None
398
399
400 def panel_node_draw(layout, id_data, output_type, input_name):
401     if not id_data.node_tree:
402         layout.prop(id_data, "use_nodes", icon='NODETREE')
403         return False
404
405     ntree = id_data.node_tree
406
407     node = find_node(id_data, output_type)
408     if not node:
409         layout.label(text="No output node.")
410     else:
411         input = find_node_input(node, input_name)
412         layout.template_node_view(ntree, node, input)
413
414     return True
415
416
417 class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
418     bl_label = "Lamp"
419     bl_context = "data"
420
421     @classmethod
422     def poll(cls, context):
423         return context.lamp and CyclesButtonsPanel.poll(context)
424
425     def draw(self, context):
426         layout = self.layout
427
428         lamp = context.lamp
429         clamp = lamp.cycles
430
431         layout.prop(lamp, "type", expand=True)
432
433         split = layout.split()
434         col = split.column(align=True)
435
436         if lamp.type in {'POINT', 'SUN', 'SPOT'}:
437             col.prop(lamp, "shadow_soft_size", text="Size")
438         elif lamp.type == 'AREA':
439             col.prop(lamp, "shape", text="")
440             sub = col.column(align=True)
441
442             if lamp.shape == 'SQUARE':
443                 sub.prop(lamp, "size")
444             elif lamp.shape == 'RECTANGLE':
445                 sub.prop(lamp, "size", text="Size X")
446                 sub.prop(lamp, "size_y", text="Size Y")
447
448         col = split.column()
449         col.prop(clamp, "cast_shadow")
450
451         if lamp.type == 'SPOT':
452             layout.label(text="Not supported, interpreted as point lamp.")
453         elif lamp.type == 'HEMI':
454             layout.label(text="Not supported, interpreted as sun lamp.")
455
456
457 class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel):
458     bl_label = "Nodes"
459     bl_context = "data"
460
461     @classmethod
462     def poll(cls, context):
463         return context.lamp and CyclesButtonsPanel.poll(context)
464
465     def draw(self, context):
466         layout = self.layout
467
468         lamp = context.lamp
469         if not panel_node_draw(layout, lamp, 'OUTPUT_LAMP', 'Surface'):
470             layout.prop(lamp, "color")
471
472
473 class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
474     bl_label = "Surface"
475     bl_context = "world"
476
477     @classmethod
478     def poll(cls, context):
479         return context.world and CyclesButtonsPanel.poll(context)
480
481     def draw(self, context):
482         layout = self.layout
483
484         world = context.world
485
486         if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'):
487             layout.prop(world, "horizon_color", text="Color")
488
489
490 class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
491     bl_label = "Settings"
492     bl_context = "world"
493     bl_options = {'DEFAULT_CLOSED'}
494
495     @classmethod
496     def poll(cls, context):
497         return context.world and CyclesButtonsPanel.poll(context)
498
499     def draw(self, context):
500         layout = self.layout
501
502         world = context.world
503         cworld = world.cycles
504
505         col = layout.column()
506
507         col.prop(cworld, "sample_as_light")
508         row = col.row()
509         row.active = cworld.sample_as_light
510         row.prop(cworld, "sample_map_resolution")
511
512
513 class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
514     bl_label = "Volume"
515     bl_context = "world"
516     bl_options = {'DEFAULT_CLOSED'}
517
518     @classmethod
519     def poll(cls, context):
520         # world = context.world
521         # world and world.node_tree and CyclesButtonsPanel.poll(context)
522         return False
523
524     def draw(self, context):
525         layout = self.layout
526         layout.active = False
527
528         world = context.world
529         panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume')
530
531
532 class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
533     bl_label = "Surface"
534     bl_context = "material"
535
536     @classmethod
537     def poll(cls, context):
538         return context.material and CyclesButtonsPanel.poll(context)
539
540     def draw(self, context):
541         layout = self.layout
542
543         mat = context.material
544         if not panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Surface'):
545             layout.prop(mat, "diffuse_color")
546
547
548 class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
549     bl_label = "Volume"
550     bl_context = "material"
551     bl_options = {'DEFAULT_CLOSED'}
552
553     @classmethod
554     def poll(cls, context):
555         # mat = context.material
556         # mat and mat.node_tree and CyclesButtonsPanel.poll(context)
557         return False
558
559     def draw(self, context):
560         layout = self.layout
561         layout.active = False
562
563         mat = context.material
564         cmat = mat.cycles
565
566         panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Volume')
567
568         layout.prop(cmat, "homogeneous_volume")
569
570
571 class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel):
572     bl_label = "Displacement"
573     bl_context = "material"
574
575     @classmethod
576     def poll(cls, context):
577         mat = context.material
578         return mat and mat.node_tree and CyclesButtonsPanel.poll(context)
579
580     def draw(self, context):
581         layout = self.layout
582
583         mat = context.material
584         panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Displacement')
585
586
587 class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
588     bl_label = "Settings"
589     bl_context = "material"
590     bl_options = {'DEFAULT_CLOSED'}
591
592     @classmethod
593     def poll(cls, context):
594         return context.material and CyclesButtonsPanel.poll(context)
595
596     def draw(self, context):
597         layout = self.layout
598
599         mat = context.material
600         cmat = mat.cycles
601
602         split = layout.split()
603
604         col = split.column()
605         col.prop(mat, "diffuse_color", text="Viewport Color")
606
607         col = split.column()
608         col.prop(cmat, "sample_as_light")
609
610
611 class CyclesTexture_PT_context(CyclesButtonsPanel, Panel):
612     bl_label = ""
613     bl_context = "texture"
614     bl_options = {'HIDE_HEADER'}
615     COMPAT_ENGINES = {'CYCLES'}
616
617     def draw(self, context):
618         layout = self.layout
619
620         tex = context.texture
621         space = context.space_data
622         pin_id = space.pin_id
623         use_pin_id = space.use_pin_id
624         user = context.texture_user
625         # node = context.texture_node
626
627         if not use_pin_id or not isinstance(pin_id, bpy.types.Texture):
628             pin_id = None
629
630         if not pin_id:
631             layout.template_texture_user()
632
633         if user:
634             layout.separator()
635
636             split = layout.split(percentage=0.65)
637             col = split.column()
638
639             if pin_id:
640                 col.template_ID(space, "pin_id")
641             elif user:
642                 col.template_ID(user, "texture", new="texture.new")
643
644             if tex:
645                 split = layout.split(percentage=0.2)
646                 split.label(text="Type:")
647                 split.prop(tex, "type", text="")
648
649
650 class CyclesTexture_PT_nodes(CyclesButtonsPanel, Panel):
651     bl_label = "Nodes"
652     bl_context = "texture"
653
654     @classmethod
655     def poll(cls, context):
656         tex = context.texture
657         return (tex and tex.use_nodes) and CyclesButtonsPanel.poll(context)
658
659     def draw(self, context):
660         layout = self.layout
661
662         tex = context.texture
663         panel_node_draw(layout, tex, 'OUTPUT_TEXTURE', 'Color')
664
665
666 class CyclesTexture_PT_node(CyclesButtonsPanel, Panel):
667     bl_label = "Node"
668     bl_context = "texture"
669
670     @classmethod
671     def poll(cls, context):
672         node = context.texture_node
673         return node and CyclesButtonsPanel.poll(context)
674
675     def draw(self, context):
676         layout = self.layout
677
678         node = context.texture_node
679         ntree = node.id_data
680         layout.template_node_view(ntree, node, None)
681
682
683 class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel):
684     bl_label = "Mapping"
685     bl_context = "texture"
686
687     @classmethod
688     def poll(cls, context):
689         tex = context.texture
690         node = context.texture_node
691         return (node or (tex and tex.use_nodes)) and CyclesButtonsPanel.poll(context)
692
693     def draw(self, context):
694         layout = self.layout
695
696         # tex = context.texture
697         node = context.texture_node
698
699         mapping = node.texture_mapping
700
701         row = layout.row()
702
703         row.column().prop(mapping, "location")
704         row.column().prop(mapping, "rotation")
705         row.column().prop(mapping, "scale")
706
707         layout.label(text="Projection:")
708
709         row = layout.row()
710         row.prop(mapping, "mapping_x", text="")
711         row.prop(mapping, "mapping_y", text="")
712         row.prop(mapping, "mapping_z", text="")
713
714
715 class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel):
716     bl_label = "Color"
717     bl_context = "texture"
718     bl_options = {'DEFAULT_CLOSED'}
719
720     @classmethod
721     def poll(cls, context):
722         # tex = context.texture
723         # node = context.texture_node
724         return False
725         #return (node or (tex and tex.use_nodes)) and CyclesButtonsPanel.poll(context)
726
727     def draw(self, context):
728         layout = self.layout
729
730         # tex = context.texture
731         node = context.texture_node
732
733         mapping = node.color_mapping
734
735         split = layout.split()
736
737         col = split.column()
738         col.label(text="Blend:")
739         col.prop(mapping, "blend_type", text="")
740         col.prop(mapping, "blend_factor", text="Factor")
741         col.prop(mapping, "blend_color", text="")
742
743         col = split.column()
744         col.label(text="Adjust:")
745         col.prop(mapping, "brightness")
746         col.prop(mapping, "contrast")
747         col.prop(mapping, "saturation")
748
749         layout.separator()
750
751         layout.prop(mapping, "use_color_ramp", text="Ramp")
752         if mapping.use_color_ramp:
753             layout.template_color_ramp(mapping, "color_ramp", expand=True)
754
755
756 def draw_device(self, context):
757     scene = context.scene
758     layout = self.layout
759
760     if scene.render.engine == 'CYCLES':
761         cscene = scene.cycles
762
763         layout.prop(cscene, "feature_set")
764
765         device_type = context.user_preferences.system.compute_device_type
766         if device_type == 'CUDA':
767             layout.prop(cscene, "device")
768         elif device_type == 'OPENCL' and cscene.feature_set == 'EXPERIMENTAL':
769             layout.prop(cscene, "device")
770
771
772 def draw_pause(self, context):
773     layout = self.layout
774     scene = context.scene
775
776     if scene.render.engine == "CYCLES":
777         view = context.space_data
778
779         if view.viewport_shade == 'RENDERED':
780             cscene = scene.cycles
781             layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
782
783
784 def get_panels():
785     return (
786         bpy.types.RENDER_PT_render,
787         bpy.types.RENDER_PT_output,
788         bpy.types.RENDER_PT_encoding,
789         bpy.types.RENDER_PT_dimensions,
790         bpy.types.RENDER_PT_stamp,
791         bpy.types.SCENE_PT_scene,
792         bpy.types.SCENE_PT_audio,
793         bpy.types.SCENE_PT_unit,
794         bpy.types.SCENE_PT_keying_sets,
795         bpy.types.SCENE_PT_keying_set_paths,
796         bpy.types.SCENE_PT_physics,
797         bpy.types.WORLD_PT_context_world,
798         bpy.types.DATA_PT_context_mesh,
799         bpy.types.DATA_PT_context_camera,
800         bpy.types.DATA_PT_context_lamp,
801         bpy.types.DATA_PT_texture_space,
802         bpy.types.DATA_PT_curve_texture_space,
803         bpy.types.DATA_PT_mball_texture_space,
804         bpy.types.DATA_PT_vertex_groups,
805         bpy.types.DATA_PT_shape_keys,
806         bpy.types.DATA_PT_uv_texture,
807         bpy.types.DATA_PT_vertex_colors,
808         bpy.types.DATA_PT_camera,
809         bpy.types.DATA_PT_camera_display,
810         bpy.types.DATA_PT_lens,
811         bpy.types.DATA_PT_custom_props_mesh,
812         bpy.types.DATA_PT_custom_props_camera,
813         bpy.types.DATA_PT_custom_props_lamp,
814         bpy.types.TEXTURE_PT_clouds,
815         bpy.types.TEXTURE_PT_wood,
816         bpy.types.TEXTURE_PT_marble,
817         bpy.types.TEXTURE_PT_magic,
818         bpy.types.TEXTURE_PT_blend,
819         bpy.types.TEXTURE_PT_stucci,
820         bpy.types.TEXTURE_PT_image,
821         bpy.types.TEXTURE_PT_image_sampling,
822         bpy.types.TEXTURE_PT_image_mapping,
823         bpy.types.TEXTURE_PT_musgrave,
824         bpy.types.TEXTURE_PT_voronoi,
825         bpy.types.TEXTURE_PT_distortednoise,
826         bpy.types.TEXTURE_PT_voxeldata,
827         bpy.types.TEXTURE_PT_pointdensity,
828         bpy.types.TEXTURE_PT_pointdensity_turbulence,
829         bpy.types.PARTICLE_PT_context_particles,
830         bpy.types.PARTICLE_PT_emission,
831         bpy.types.PARTICLE_PT_hair_dynamics,
832         bpy.types.PARTICLE_PT_cache,
833         bpy.types.PARTICLE_PT_velocity,
834         bpy.types.PARTICLE_PT_rotation,
835         bpy.types.PARTICLE_PT_physics,
836         bpy.types.PARTICLE_PT_boidbrain,
837         bpy.types.PARTICLE_PT_render,
838         bpy.types.PARTICLE_PT_draw,
839         bpy.types.PARTICLE_PT_children,
840         bpy.types.PARTICLE_PT_field_weights,
841         bpy.types.PARTICLE_PT_force_fields,
842         bpy.types.PARTICLE_PT_vertexgroups,
843         bpy.types.PARTICLE_PT_custom_props,
844         )
845
846
847 def register():
848     bpy.types.RENDER_PT_render.append(draw_device)
849     bpy.types.VIEW3D_HT_header.append(draw_pause)
850
851     for panel in get_panels():
852         panel.COMPAT_ENGINES.add('CYCLES')
853
854
855 def unregister():
856     bpy.types.RENDER_PT_render.remove(draw_device)
857     bpy.types.VIEW3D_HT_header.remove(draw_pause)
858
859     for panel in get_panels():
860         panel.COMPAT_ENGINES.remove('CYCLES')