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