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