svn merge ^/trunk/blender -r43616:43639
[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         rl = rd.layers[0]
187         layout.prop(rl, "material_override", text="Material")
188
189
190 class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
191     bl_label = "Post Processing"
192     bl_options = {'DEFAULT_CLOSED'}
193
194     def draw(self, context):
195         layout = self.layout
196
197         rd = context.scene.render
198
199         split = layout.split()
200
201         col = split.column()
202         col.prop(rd, "use_compositing")
203         col.prop(rd, "use_sequencer")
204
205         col = split.column()
206         col.prop(rd, "dither_intensity", text="Dither", slider=True)
207
208
209 class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
210     bl_label = "Depth of Field"
211     bl_context = "data"
212
213     @classmethod
214     def poll(cls, context):
215         return context.camera and CyclesButtonsPanel.poll(context)
216
217     def draw(self, context):
218         layout = self.layout
219
220         cam = context.camera
221         ccam = cam.cycles
222
223         split = layout.split()
224
225         col = split.column()
226         col.label("Focus:")
227         col.prop(cam, "dof_object", text="")
228
229         sub = col.row()
230         sub.active = cam.dof_object is None
231         sub.prop(cam, "dof_distance", text="Distance")
232
233         col = split.column()
234
235         col.label("Aperture:")
236         col.prop(ccam, "aperture_size", text="Size")
237
238         sub = col.column(align=True)
239         sub.prop(ccam, "aperture_blades", text="Blades")
240         sub.prop(ccam, "aperture_rotation", text="Rotation")
241
242
243 class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
244     bl_label = "Surface"
245     bl_context = "material"
246     bl_options = {'HIDE_HEADER'}
247
248     @classmethod
249     def poll(cls, context):
250         return (context.material or context.object) and CyclesButtonsPanel.poll(context)
251
252     def draw(self, context):
253         layout = self.layout
254
255         mat = context.material
256         ob = context.object
257         slot = context.material_slot
258         space = context.space_data
259
260         if ob:
261             row = layout.row()
262
263             row.template_list(ob, "material_slots", ob, "active_material_index", rows=2)
264
265             col = row.column(align=True)
266             col.operator("object.material_slot_add", icon='ZOOMIN', text="")
267             col.operator("object.material_slot_remove", icon='ZOOMOUT', text="")
268
269             col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")
270
271             if ob.mode == 'EDIT':
272                 row = layout.row(align=True)
273                 row.operator("object.material_slot_assign", text="Assign")
274                 row.operator("object.material_slot_select", text="Select")
275                 row.operator("object.material_slot_deselect", text="Deselect")
276
277         split = layout.split(percentage=0.65)
278
279         if ob:
280             split.template_ID(ob, "active_material", new="material.new")
281             row = split.row()
282
283             if slot:
284                 row.prop(slot, "link", text="")
285             else:
286                 row.label()
287         elif mat:
288             split.template_ID(space, "pin_id")
289             split.separator()
290
291
292 class Cycles_PT_mesh_displacement(CyclesButtonsPanel, Panel):
293     bl_label = "Displacement"
294     bl_context = "data"
295
296     @classmethod
297     def poll(cls, context):
298         if CyclesButtonsPanel.poll(context):
299             if context.mesh or context.curve or context.meta_ball:
300                 if context.scene.cycles.feature_set == 'EXPERIMENTAL':
301                     return True
302
303         return False
304
305     def draw(self, context):
306         layout = self.layout
307
308         mesh = context.mesh
309         curve = context.curve
310         mball = context.meta_ball
311
312         if mesh:
313             cdata = mesh.cycles
314         elif curve:
315             cdata = curve.cycles
316         elif mball:
317             cdata = mball.cycles
318
319         layout.prop(cdata, "displacement_method", text="Method")
320         layout.prop(cdata, "use_subdivision")
321         layout.prop(cdata, "dicing_rate")
322
323
324 class CyclesObject_PT_ray_visibility(CyclesButtonsPanel, Panel):
325     bl_label = "Ray Visibility"
326     bl_context = "object"
327     bl_options = {'DEFAULT_CLOSED'}
328
329     @classmethod
330     def poll(cls, context):
331         ob = context.object
332         return CyclesButtonsPanel.poll(context) and ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META'}  # todo: 'LAMP'
333
334     def draw(self, context):
335         layout = self.layout
336
337         ob = context.object
338         visibility = ob.cycles_visibility
339
340         flow = layout.column_flow()
341         
342         flow.prop(visibility, "camera")
343         flow.prop(visibility, "diffuse")
344         flow.prop(visibility, "glossy")
345         flow.prop(visibility, "transmission")
346         flow.prop(visibility, "shadow")
347
348
349 def find_node(material, nodetype):
350     if material and material.node_tree:
351         ntree = material.node_tree
352
353         for node in ntree.nodes:
354             if getattr(node, "type", None) == nodetype:
355                 return node
356
357     return None
358
359
360 def find_node_input(node, name):
361     for input in node.inputs:
362         if input.name == name:
363             return input
364
365     return None
366
367
368 def panel_node_draw(layout, id_data, output_type, input_name):
369     if not id_data.node_tree:
370         layout.prop(id_data, "use_nodes", icon='NODETREE')
371         return False
372
373     ntree = id_data.node_tree
374
375     node = find_node(id_data, output_type)
376     if not node:
377         layout.label(text="No output node.")
378     else:
379         input = find_node_input(node, input_name)
380         layout.template_node_view(ntree, node, input)
381
382     return True
383
384
385 class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
386     bl_label = "Lamp"
387     bl_context = "data"
388
389     @classmethod
390     def poll(cls, context):
391         return context.lamp and CyclesButtonsPanel.poll(context)
392
393     def draw(self, context):
394         layout = self.layout
395
396         lamp = context.lamp
397         clamp = lamp.cycles
398
399         layout.prop(lamp, "type", expand=True)
400
401         split = layout.split()
402         col = split.column(align=True)
403
404         if lamp.type in {'POINT', 'SUN', 'SPOT'}:
405             col.prop(lamp, "shadow_soft_size", text="Size")
406         elif lamp.type == 'AREA':
407             col.prop(lamp, "shape", text="")
408             sub = col.column(align=True)
409
410             if lamp.shape == 'SQUARE':
411                 sub.prop(lamp, "size")
412             elif lamp.shape == 'RECTANGLE':
413                 sub.prop(lamp, "size", text="Size X")
414                 sub.prop(lamp, "size_y", text="Size Y")
415
416         col = split.column()
417         col.prop(clamp, "cast_shadow")
418
419         if lamp.type == 'SPOT':
420             layout.label(text="Not supported, interpreted as point lamp.")
421         elif lamp.type == 'HEMI':
422             layout.label(text="Not supported, interpreted as sun lamp.")
423
424
425 class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel):
426     bl_label = "Nodes"
427     bl_context = "data"
428
429     @classmethod
430     def poll(cls, context):
431         return context.lamp and CyclesButtonsPanel.poll(context)
432
433     def draw(self, context):
434         layout = self.layout
435
436         lamp = context.lamp
437         if not panel_node_draw(layout, lamp, 'OUTPUT_LAMP', 'Surface'):
438             layout.prop(lamp, "color")
439
440
441 class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
442     bl_label = "Surface"
443     bl_context = "world"
444
445     @classmethod
446     def poll(cls, context):
447         return context.world and CyclesButtonsPanel.poll(context)
448
449     def draw(self, context):
450         layout = self.layout
451
452         world = context.world
453
454         if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'):
455             layout.prop(world, "horizon_color", text="Color")
456
457
458 class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
459     bl_label = "Settings"
460     bl_context = "world"
461     bl_options = {'DEFAULT_CLOSED'}
462
463     @classmethod
464     def poll(cls, context):
465         return context.world and CyclesButtonsPanel.poll(context)
466
467     def draw(self, context):
468         layout = self.layout
469
470         world = context.world
471         cworld = world.cycles
472
473         col = layout.column()
474
475         col.prop(cworld, "sample_as_light")
476         row = col.row()
477         row.active = cworld.sample_as_light
478         row.prop(cworld, "sample_map_resolution")
479
480
481 class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
482     bl_label = "Volume"
483     bl_context = "world"
484     bl_options = {'DEFAULT_CLOSED'}
485
486     @classmethod
487     def poll(cls, context):
488         # world = context.world
489         # world and world.node_tree and CyclesButtonsPanel.poll(context)
490         return False
491
492     def draw(self, context):
493         layout = self.layout
494         layout.active = False
495
496         world = context.world
497         panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume')
498
499
500 class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
501     bl_label = "Surface"
502     bl_context = "material"
503
504     @classmethod
505     def poll(cls, context):
506         return context.material and CyclesButtonsPanel.poll(context)
507
508     def draw(self, context):
509         layout = self.layout
510
511         mat = context.material
512         if not panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Surface'):
513             layout.prop(mat, "diffuse_color")
514
515
516 class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
517     bl_label = "Volume"
518     bl_context = "material"
519     bl_options = {'DEFAULT_CLOSED'}
520
521     @classmethod
522     def poll(cls, context):
523         # mat = context.material
524         # mat and mat.node_tree and CyclesButtonsPanel.poll(context)
525         return False
526
527     def draw(self, context):
528         layout = self.layout
529         layout.active = False
530
531         mat = context.material
532         cmat = mat.cycles
533
534         panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Volume')
535
536         layout.prop(cmat, "homogeneous_volume")
537
538
539 class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel):
540     bl_label = "Displacement"
541     bl_context = "material"
542
543     @classmethod
544     def poll(cls, context):
545         mat = context.material
546         return mat and mat.node_tree and CyclesButtonsPanel.poll(context)
547
548     def draw(self, context):
549         layout = self.layout
550
551         mat = context.material
552         panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Displacement')
553
554
555 class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
556     bl_label = "Settings"
557     bl_context = "material"
558     bl_options = {'DEFAULT_CLOSED'}
559
560     @classmethod
561     def poll(cls, context):
562         return context.material and CyclesButtonsPanel.poll(context)
563
564     def draw(self, context):
565         layout = self.layout
566
567         mat = context.material
568         cmat = mat.cycles
569
570         split = layout.split()
571
572         col = split.column()
573         col.prop(mat, "diffuse_color", text="Viewport Color")
574
575         col = split.column()
576         col.prop(cmat, "sample_as_light")
577
578
579 class CyclesTexture_PT_context(CyclesButtonsPanel, Panel):
580     bl_label = ""
581     bl_context = "texture"
582     bl_options = {'HIDE_HEADER'}
583     COMPAT_ENGINES = {'CYCLES'}
584
585     def draw(self, context):
586         layout = self.layout
587
588         tex = context.texture
589         space = context.space_data
590         pin_id = space.pin_id
591         use_pin_id = space.use_pin_id
592         user = context.texture_user
593         # node = context.texture_node
594
595         if not use_pin_id or not isinstance(pin_id, bpy.types.Texture):
596             pin_id = None
597
598         if not pin_id:
599             layout.template_texture_user()
600
601         if user:
602             layout.separator()
603
604             split = layout.split(percentage=0.65)
605             col = split.column()
606
607             if pin_id:
608                 col.template_ID(space, "pin_id")
609             elif user:
610                 col.template_ID(user, "texture", new="texture.new")
611
612             if tex:
613                 split = layout.split(percentage=0.2)
614                 split.label(text="Type:")
615                 split.prop(tex, "type", text="")
616
617
618 class CyclesTexture_PT_nodes(CyclesButtonsPanel, Panel):
619     bl_label = "Nodes"
620     bl_context = "texture"
621
622     @classmethod
623     def poll(cls, context):
624         tex = context.texture
625         return (tex and tex.use_nodes) and CyclesButtonsPanel.poll(context)
626
627     def draw(self, context):
628         layout = self.layout
629
630         tex = context.texture
631         panel_node_draw(layout, tex, 'OUTPUT_TEXTURE', 'Color')
632
633
634 class CyclesTexture_PT_node(CyclesButtonsPanel, Panel):
635     bl_label = "Node"
636     bl_context = "texture"
637
638     @classmethod
639     def poll(cls, context):
640         node = context.texture_node
641         return node and CyclesButtonsPanel.poll(context)
642
643     def draw(self, context):
644         layout = self.layout
645
646         node = context.texture_node
647         ntree = node.id_data
648         layout.template_node_view(ntree, node, None)
649
650
651 class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel):
652     bl_label = "Mapping"
653     bl_context = "texture"
654
655     @classmethod
656     def poll(cls, context):
657         tex = context.texture
658         node = context.texture_node
659         return (node or (tex and tex.use_nodes)) and CyclesButtonsPanel.poll(context)
660
661     def draw(self, context):
662         layout = self.layout
663
664         # tex = context.texture
665         node = context.texture_node
666
667         mapping = node.texture_mapping
668
669         row = layout.row()
670
671         row.column().prop(mapping, "location")
672         row.column().prop(mapping, "rotation")
673         row.column().prop(mapping, "scale")
674
675         layout.label(text="Projection:")
676
677         row = layout.row()
678         row.prop(mapping, "mapping_x", text="")
679         row.prop(mapping, "mapping_y", text="")
680         row.prop(mapping, "mapping_z", text="")
681
682
683 class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel):
684     bl_label = "Color"
685     bl_context = "texture"
686     bl_options = {'DEFAULT_CLOSED'}
687
688     @classmethod
689     def poll(cls, context):
690         # tex = context.texture
691         # node = context.texture_node
692         return False
693         #return (node or (tex and tex.use_nodes)) and CyclesButtonsPanel.poll(context)
694
695     def draw(self, context):
696         layout = self.layout
697
698         # tex = context.texture
699         node = context.texture_node
700
701         mapping = node.color_mapping
702
703         split = layout.split()
704
705         col = split.column()
706         col.label(text="Blend:")
707         col.prop(mapping, "blend_type", text="")
708         col.prop(mapping, "blend_factor", text="Factor")
709         col.prop(mapping, "blend_color", text="")
710
711         col = split.column()
712         col.label(text="Adjust:")
713         col.prop(mapping, "brightness")
714         col.prop(mapping, "contrast")
715         col.prop(mapping, "saturation")
716
717         layout.separator()
718
719         layout.prop(mapping, "use_color_ramp", text="Ramp")
720         if mapping.use_color_ramp:
721             layout.template_color_ramp(mapping, "color_ramp", expand=True)
722
723
724 def draw_device(self, context):
725     scene = context.scene
726     layout = self.layout
727
728     if scene.render.engine == 'CYCLES':
729         cscene = scene.cycles
730
731         layout.prop(cscene, "feature_set")
732
733         device_type = context.user_preferences.system.compute_device_type
734         if device_type == 'CUDA':
735             layout.prop(cscene, "device")
736         elif device_type == 'OPENCL' and cscene.feature_set == 'EXPERIMENTAL':
737             layout.prop(cscene, "device")
738
739
740 def draw_pause(self, context):
741     layout = self.layout
742     scene = context.scene
743
744     if scene.render.engine == "CYCLES":
745         view = context.space_data
746
747         if view.viewport_shade == 'RENDERED':
748             cscene = scene.cycles
749             layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
750
751
752 def get_panels():
753     return (
754         bpy.types.RENDER_PT_render,
755         bpy.types.RENDER_PT_output,
756         bpy.types.RENDER_PT_encoding,
757         bpy.types.RENDER_PT_dimensions,
758         bpy.types.RENDER_PT_stamp,
759         bpy.types.SCENE_PT_scene,
760         bpy.types.SCENE_PT_audio,
761         bpy.types.SCENE_PT_unit,
762         bpy.types.SCENE_PT_keying_sets,
763         bpy.types.SCENE_PT_keying_set_paths,
764         bpy.types.SCENE_PT_physics,
765         bpy.types.WORLD_PT_context_world,
766         bpy.types.DATA_PT_context_mesh,
767         bpy.types.DATA_PT_context_camera,
768         bpy.types.DATA_PT_context_lamp,
769         bpy.types.DATA_PT_texture_space,
770         bpy.types.DATA_PT_curve_texture_space,
771         bpy.types.DATA_PT_mball_texture_space,
772         bpy.types.DATA_PT_vertex_groups,
773         bpy.types.DATA_PT_shape_keys,
774         bpy.types.DATA_PT_uv_texture,
775         bpy.types.DATA_PT_vertex_colors,
776         bpy.types.DATA_PT_camera,
777         bpy.types.DATA_PT_camera_display,
778         bpy.types.DATA_PT_lens,
779         bpy.types.DATA_PT_custom_props_mesh,
780         bpy.types.DATA_PT_custom_props_camera,
781         bpy.types.DATA_PT_custom_props_lamp,
782         bpy.types.TEXTURE_PT_clouds,
783         bpy.types.TEXTURE_PT_wood,
784         bpy.types.TEXTURE_PT_marble,
785         bpy.types.TEXTURE_PT_magic,
786         bpy.types.TEXTURE_PT_blend,
787         bpy.types.TEXTURE_PT_stucci,
788         bpy.types.TEXTURE_PT_image,
789         bpy.types.TEXTURE_PT_image_sampling,
790         bpy.types.TEXTURE_PT_image_mapping,
791         bpy.types.TEXTURE_PT_musgrave,
792         bpy.types.TEXTURE_PT_voronoi,
793         bpy.types.TEXTURE_PT_distortednoise,
794         bpy.types.TEXTURE_PT_voxeldata,
795         bpy.types.TEXTURE_PT_pointdensity,
796         bpy.types.TEXTURE_PT_pointdensity_turbulence,
797         bpy.types.PARTICLE_PT_context_particles,
798         bpy.types.PARTICLE_PT_emission,
799         bpy.types.PARTICLE_PT_hair_dynamics,
800         bpy.types.PARTICLE_PT_cache,
801         bpy.types.PARTICLE_PT_velocity,
802         bpy.types.PARTICLE_PT_rotation,
803         bpy.types.PARTICLE_PT_physics,
804         bpy.types.PARTICLE_PT_boidbrain,
805         bpy.types.PARTICLE_PT_render,
806         bpy.types.PARTICLE_PT_draw,
807         bpy.types.PARTICLE_PT_children,
808         bpy.types.PARTICLE_PT_field_weights,
809         bpy.types.PARTICLE_PT_force_fields,
810         bpy.types.PARTICLE_PT_vertexgroups,
811         bpy.types.PARTICLE_PT_custom_props,
812         )
813
814
815 def register():
816     bpy.types.RENDER_PT_render.append(draw_device)
817     bpy.types.VIEW3D_HT_header.append(draw_pause)
818
819     for panel in get_panels():
820         panel.COMPAT_ENGINES.add('CYCLES')
821
822
823 def unregister():
824     bpy.types.RENDER_PT_render.remove(draw_device)
825     bpy.types.VIEW3D_HT_header.remove(draw_pause)
826
827     for panel in get_panels():
828         panel.COMPAT_ENGINES.remove('CYCLES')