2 # Copyright 2011-2013 Blender Foundation
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
21 from bpy.types import (
28 class CYCLES_MT_sampling_presets(Menu):
29 bl_label = "Sampling Presets"
30 preset_subdir = "cycles/sampling"
31 preset_operator = "script.execute_preset"
32 COMPAT_ENGINES = {'CYCLES'}
33 draw = Menu.draw_preset
36 class CYCLES_MT_integrator_presets(Menu):
37 bl_label = "Integrator Presets"
38 preset_subdir = "cycles/integrator"
39 preset_operator = "script.execute_preset"
40 COMPAT_ENGINES = {'CYCLES'}
41 draw = Menu.draw_preset
44 class CyclesButtonsPanel:
45 bl_space_type = "PROPERTIES"
46 bl_region_type = "WINDOW"
48 COMPAT_ENGINES = {'CYCLES'}
51 def poll(cls, context):
52 rd = context.scene.render
53 return rd.engine in cls.COMPAT_ENGINES
56 def get_device_type(context):
57 return context.user_preferences.addons[__package__].preferences.compute_device_type
61 cscene = context.scene.cycles
63 return (get_device_type(context) == 'NONE' or cscene.device == 'CPU')
66 def use_opencl(context):
67 cscene = context.scene.cycles
69 return (get_device_type(context) == 'OPENCL' and cscene.device == 'GPU')
72 def use_cuda(context):
73 cscene = context.scene.cycles
75 return (get_device_type(context) == 'CUDA' and cscene.device == 'GPU')
78 def use_branched_path(context):
79 cscene = context.scene.cycles
81 return (cscene.progressive == 'BRANCHED_PATH' and not use_opencl(context))
84 def use_sample_all_lights(context):
85 cscene = context.scene.cycles
87 return cscene.sample_all_lights_direct or cscene.sample_all_lights_indirect
89 def show_device_selection(context):
90 type = get_device_type(context)
93 if not type in {'CUDA', 'OPENCL'}:
95 return context.user_preferences.addons[__package__].preferences.has_active_device()
98 def draw_samples_info(layout, context):
99 cscene = context.scene.cycles
100 integrator = cscene.progressive
102 # Calculate sample values
103 if integrator == 'PATH':
105 if cscene.use_square_samples:
108 aa = cscene.aa_samples
109 d = cscene.diffuse_samples
110 g = cscene.glossy_samples
111 t = cscene.transmission_samples
112 ao = cscene.ao_samples
113 ml = cscene.mesh_light_samples
114 sss = cscene.subsurface_samples
115 vol = cscene.volume_samples
117 if cscene.use_square_samples:
128 # Do not draw for progressive, when Square Samples are disabled
129 if use_branched_path(context) or (cscene.use_square_samples and integrator == 'PATH'):
130 col = layout.column(align=True)
132 col.label("Total Samples:")
134 if integrator == 'PATH':
135 col.label("%s AA" % aa)
137 col.label("%s AA, %s Diffuse, %s Glossy, %s Transmission" %
138 (aa, d * aa, g * aa, t * aa))
140 col.label("%s AO, %s Mesh Light, %s Subsurface, %s Volume" %
141 (ao * aa, ml * aa, sss * aa, vol * aa))
144 class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
145 bl_label = "Sampling"
146 bl_options = {'DEFAULT_CLOSED'}
148 def draw(self, context):
151 scene = context.scene
152 cscene = scene.cycles
154 row = layout.row(align=True)
155 row.menu("CYCLES_MT_sampling_presets", text=bpy.types.CYCLES_MT_sampling_presets.bl_label)
156 row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMIN")
157 row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMOUT").remove_active = True
161 sub.active = get_device_type(context) != 'OPENCL' or use_cpu(context)
162 sub.prop(cscene, "progressive", text="")
163 row.prop(cscene, "use_square_samples")
165 split = layout.split()
168 sub = col.column(align=True)
169 sub.label("Settings:")
171 seed_sub = sub.row(align=True)
172 seed_sub.prop(cscene, "seed")
173 seed_sub.prop(cscene, "use_animated_seed", text="", icon="TIME")
175 sub.prop(cscene, "sample_clamp_direct")
176 sub.prop(cscene, "sample_clamp_indirect")
177 sub.prop(cscene, "light_sampling_threshold")
179 if cscene.progressive == 'PATH' or use_branched_path(context) is False:
181 sub = col.column(align=True)
182 sub.label(text="Samples:")
183 sub.prop(cscene, "samples", text="Render")
184 sub.prop(cscene, "preview_samples", text="Preview")
186 sub.label(text="AA Samples:")
187 sub.prop(cscene, "aa_samples", text="Render")
188 sub.prop(cscene, "preview_aa_samples", text="Preview")
190 sub.prop(cscene, "sample_all_lights_direct")
191 sub.prop(cscene, "sample_all_lights_indirect")
194 sub = col.column(align=True)
195 sub.label(text="Samples:")
196 sub.prop(cscene, "diffuse_samples", text="Diffuse")
197 sub.prop(cscene, "glossy_samples", text="Glossy")
198 sub.prop(cscene, "transmission_samples", text="Transmission")
199 sub.prop(cscene, "ao_samples", text="AO")
201 subsub = sub.row(align=True)
202 subsub.active = use_sample_all_lights(context)
203 subsub.prop(cscene, "mesh_light_samples", text="Mesh Light")
205 sub.prop(cscene, "subsurface_samples", text="Subsurface")
206 sub.prop(cscene, "volume_samples", text="Volume")
208 if not (use_opencl(context) and cscene.feature_set != 'EXPERIMENTAL'):
209 layout.row().prop(cscene, "sampling_pattern", text="Pattern")
211 for rl in scene.render.layers:
214 layout.row().prop(cscene, "use_layer_samples")
217 draw_samples_info(layout, context)
220 class CyclesRender_PT_geometry(CyclesButtonsPanel, Panel):
221 bl_label = "Geometry"
222 bl_options = {'DEFAULT_CLOSED'}
224 def draw(self, context):
227 scene = context.scene
228 cscene = scene.cycles
229 ccscene = scene.cycles_curves
231 if cscene.feature_set == 'EXPERIMENTAL':
232 split = layout.split()
236 sub = col.column(align=True)
237 sub.label("Volume Sampling:")
238 sub.prop(cscene, "volume_step_size")
239 sub.prop(cscene, "volume_max_steps")
243 sub = col.column(align=True)
244 sub.label("Subdivision Rate:")
245 sub.prop(cscene, "dicing_rate", text="Render")
246 sub.prop(cscene, "preview_dicing_rate", text="Preview")
248 sub.prop(cscene, "max_subdivisions")
251 row.label("Volume Sampling:")
253 row.prop(cscene, "volume_step_size")
254 row.prop(cscene, "volume_max_steps")
256 layout.prop(ccscene, "use_curves", text="Use Hair")
257 col = layout.column()
258 col.active = ccscene.use_curves
260 col.prop(ccscene, "primitive", text="Primitive")
261 col.prop(ccscene, "shape", text="Shape")
263 if not (ccscene.primitive in {'CURVE_SEGMENTS', 'LINE_SEGMENTS'} and ccscene.shape == 'RIBBONS'):
264 col.prop(ccscene, "cull_backfacing", text="Cull back-faces")
266 if ccscene.primitive == 'TRIANGLES' and ccscene.shape == 'THICK':
267 col.prop(ccscene, "resolution", text="Resolution")
268 elif ccscene.primitive == 'CURVE_SEGMENTS':
269 col.prop(ccscene, "subdivisions", text="Curve subdivisions")
272 row.prop(ccscene, "minimum_width", text="Min Pixels")
273 row.prop(ccscene, "maximum_width", text="Max Ext.")
276 class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel):
277 bl_label = "Light Paths"
278 bl_options = {'DEFAULT_CLOSED'}
280 def draw(self, context):
283 scene = context.scene
284 cscene = scene.cycles
286 row = layout.row(align=True)
287 row.menu("CYCLES_MT_integrator_presets", text=bpy.types.CYCLES_MT_integrator_presets.bl_label)
288 row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMIN")
289 row.operator("render.cycles_integrator_preset_add", text="", icon="ZOOMOUT").remove_active = True
291 split = layout.split()
295 sub = col.column(align=True)
296 sub.label("Transparency:")
297 sub.prop(cscene, "transparent_max_bounces", text="Max")
298 sub.prop(cscene, "transparent_min_bounces", text="Min")
299 sub.prop(cscene, "use_transparent_shadows", text="Shadows")
303 col.prop(cscene, "caustics_reflective")
304 col.prop(cscene, "caustics_refractive")
305 col.prop(cscene, "blur_glossy")
309 sub = col.column(align=True)
310 sub.label(text="Bounces:")
311 sub.prop(cscene, "max_bounces", text="Max")
312 sub.prop(cscene, "min_bounces", text="Min")
314 sub = col.column(align=True)
315 sub.prop(cscene, "diffuse_bounces", text="Diffuse")
316 sub.prop(cscene, "glossy_bounces", text="Glossy")
317 sub.prop(cscene, "transmission_bounces", text="Transmission")
318 sub.prop(cscene, "volume_bounces", text="Volume")
321 class CyclesRender_PT_motion_blur(CyclesButtonsPanel, Panel):
322 bl_label = "Motion Blur"
323 bl_options = {'DEFAULT_CLOSED'}
325 def draw_header(self, context):
326 rd = context.scene.render
328 self.layout.prop(rd, "use_motion_blur", text="")
330 def draw(self, context):
333 scene = context.scene
334 cscene = scene.cycles
336 layout.active = rd.use_motion_blur
338 col = layout.column()
339 col.prop(cscene, "motion_blur_position", text="Position")
340 col.prop(rd, "motion_blur_shutter")
342 col = layout.column()
343 col.label("Shutter curve:")
344 col.template_curve_mapping(rd, "motion_blur_shutter_curve")
346 col = layout.column(align=True)
347 row = col.row(align=True)
348 row.operator("render.shutter_curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
349 row.operator("render.shutter_curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
350 row.operator("render.shutter_curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
351 row.operator("render.shutter_curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
352 row.operator("render.shutter_curve_preset", icon='LINCURVE', text="").shape = 'LINE'
353 row.operator("render.shutter_curve_preset", icon='NOCURVE', text="").shape = 'MAX'
355 col = layout.column()
356 col.prop(cscene, "rolling_shutter_type")
358 row.active = cscene.rolling_shutter_type != 'NONE'
359 row.prop(cscene, "rolling_shutter_duration")
362 class CyclesRender_PT_film(CyclesButtonsPanel, Panel):
365 def draw(self, context):
368 scene = context.scene
369 cscene = scene.cycles
371 split = layout.split()
374 col.prop(cscene, "film_exposure")
375 col.prop(cscene, "film_transparent")
378 sub = col.column(align=True)
379 sub.prop(cscene, "pixel_filter_type", text="")
380 if cscene.pixel_filter_type != 'BOX':
381 sub.prop(cscene, "filter_width", text="Width")
384 class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
385 bl_label = "Performance"
386 bl_options = {'DEFAULT_CLOSED'}
388 def draw(self, context):
391 scene = context.scene
393 cscene = scene.cycles
395 split = layout.split()
397 col = split.column(align=True)
399 col.label(text="Threads:")
400 col.row(align=True).prop(rd, "threads_mode", expand=True)
401 sub = col.column(align=True)
402 sub.enabled = rd.threads_mode == 'FIXED'
403 sub.prop(rd, "threads")
405 sub = col.column(align=True)
406 sub.label(text="Tiles:")
407 sub.prop(cscene, "tile_order", text="")
409 sub.prop(rd, "tile_x", text="X")
410 sub.prop(rd, "tile_y", text="Y")
412 sub.prop(cscene, "use_progressive_refine")
414 subsub = sub.column(align=True)
415 subsub.prop(rd, "use_save_buffers")
417 col = split.column(align=True)
419 col.label(text="Viewport:")
420 col.prop(cscene, "debug_bvh_type", text="")
422 col.prop(cscene, "preview_start_resolution")
426 col.label(text="Final Render:")
427 col.prop(rd, "use_persistent_data", text="Persistent Images")
431 col.label(text="Acceleration structure:")
432 col.prop(cscene, "debug_use_spatial_splits")
433 col.prop(cscene, "debug_use_hair_bvh")
436 row.active = not cscene.debug_use_spatial_splits
437 row.prop(cscene, "debug_bvh_time_steps")
440 class CyclesRender_PT_layer_options(CyclesButtonsPanel, Panel):
442 bl_context = "render_layer"
444 def draw(self, context):
447 scene = context.scene
449 rl = rd.layers.active
451 split = layout.split()
454 col.prop(scene, "layers", text="Scene")
455 col.prop(rl, "layers_exclude", text="Exclude")
458 col.prop(rl, "layers", text="Layer")
459 col.prop(rl, "layers_zmask", text="Mask Layer")
461 split = layout.split()
464 col.label(text="Material:")
465 col.prop(rl, "material_override", text="")
467 col.prop(rl, "samples")
470 col.prop(rl, "use_sky", "Use Environment")
471 col.prop(rl, "use_ao", "Use AO")
472 col.prop(rl, "use_solid", "Use Surfaces")
473 col.prop(rl, "use_strand", "Use Hair")
476 class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel):
478 bl_context = "render_layer"
479 bl_options = {'DEFAULT_CLOSED'}
481 def draw(self, context):
484 scene = context.scene
486 rl = rd.layers.active
488 split = layout.split()
491 col.prop(rl, "use_pass_combined")
492 col.prop(rl, "use_pass_z")
493 col.prop(rl, "use_pass_mist")
494 col.prop(rl, "use_pass_normal")
496 row.prop(rl, "use_pass_vector")
497 row.active = not rd.use_motion_blur
498 col.prop(rl, "use_pass_uv")
499 col.prop(rl, "use_pass_object_index")
500 col.prop(rl, "use_pass_material_index")
502 col.prop(rl, "use_pass_shadow")
503 col.prop(rl, "use_pass_ambient_occlusion")
505 col.prop(rl, "pass_alpha_threshold")
508 col.label(text="Diffuse:")
509 row = col.row(align=True)
510 row.prop(rl, "use_pass_diffuse_direct", text="Direct", toggle=True)
511 row.prop(rl, "use_pass_diffuse_indirect", text="Indirect", toggle=True)
512 row.prop(rl, "use_pass_diffuse_color", text="Color", toggle=True)
513 col.label(text="Glossy:")
514 row = col.row(align=True)
515 row.prop(rl, "use_pass_glossy_direct", text="Direct", toggle=True)
516 row.prop(rl, "use_pass_glossy_indirect", text="Indirect", toggle=True)
517 row.prop(rl, "use_pass_glossy_color", text="Color", toggle=True)
518 col.label(text="Transmission:")
519 row = col.row(align=True)
520 row.prop(rl, "use_pass_transmission_direct", text="Direct", toggle=True)
521 row.prop(rl, "use_pass_transmission_indirect", text="Indirect", toggle=True)
522 row.prop(rl, "use_pass_transmission_color", text="Color", toggle=True)
523 col.label(text="Subsurface:")
524 row = col.row(align=True)
525 row.prop(rl, "use_pass_subsurface_direct", text="Direct", toggle=True)
526 row.prop(rl, "use_pass_subsurface_indirect", text="Indirect", toggle=True)
527 row.prop(rl, "use_pass_subsurface_color", text="Color", toggle=True)
530 col.prop(rl, "use_pass_emit", text="Emission")
531 col.prop(rl, "use_pass_environment")
533 if hasattr(rd, "debug_pass_type"):
534 layout.prop(rd, "debug_pass_type")
537 class CyclesRender_PT_views(CyclesButtonsPanel, Panel):
539 bl_context = "render_layer"
540 bl_options = {'DEFAULT_CLOSED'}
542 def draw_header(self, context):
543 rd = context.scene.render
544 self.layout.prop(rd, "use_multiview", text="")
546 def draw(self, context):
549 scene = context.scene
553 layout.active = rd.use_multiview
554 basic_stereo = (rd.views_format == 'STEREO_3D')
557 row.prop(rd, "views_format", expand=True)
561 row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "stereo_views", rd.views, "active_index", rows=2)
564 row.label(text="File Suffix:")
565 row.prop(rv, "file_suffix", text="")
569 row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "views", rd.views, "active_index", rows=2)
571 col = row.column(align=True)
572 col.operator("scene.render_view_add", icon='ZOOMIN', text="")
573 col.operator("scene.render_view_remove", icon='ZOOMOUT', text="")
576 row.label(text="Camera Suffix:")
577 row.prop(rv, "camera_suffix", text="")
580 class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
581 bl_label = "Post Processing"
582 bl_options = {'DEFAULT_CLOSED'}
584 def draw(self, context):
587 rd = context.scene.render
589 split = layout.split()
592 col.prop(rd, "use_compositing")
593 col.prop(rd, "use_sequencer")
596 col.prop(rd, "dither_intensity", text="Dither", slider=True)
599 class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
600 bl_label = "Depth of Field"
604 def poll(cls, context):
605 return context.camera and CyclesButtonsPanel.poll(context)
607 def draw(self, context):
612 dof_options = cam.gpu_dof
614 split = layout.split()
618 col.prop(cam, "dof_object", text="")
621 sub.active = cam.dof_object is None
622 sub.prop(cam, "dof_distance", text="Distance")
624 hq_support = dof_options.is_hq_supported
625 sub = col.column(align=True)
626 sub.label("Viewport:")
628 subhq.active = hq_support
629 subhq.prop(dof_options, "use_high_quality")
630 sub.prop(dof_options, "fstop")
631 if dof_options.use_high_quality and hq_support:
632 sub.prop(dof_options, "blades")
636 col.label("Aperture:")
637 sub = col.column(align=True)
638 sub.prop(ccam, "aperture_type", text="")
639 if ccam.aperture_type == 'RADIUS':
640 sub.prop(ccam, "aperture_size", text="Size")
641 elif ccam.aperture_type == 'FSTOP':
642 sub.prop(ccam, "aperture_fstop", text="Number")
644 sub = col.column(align=True)
645 sub.prop(ccam, "aperture_blades", text="Blades")
646 sub.prop(ccam, "aperture_rotation", text="Rotation")
647 sub.prop(ccam, "aperture_ratio", text="Ratio")
650 class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
652 bl_context = "material"
653 bl_options = {'HIDE_HEADER'}
656 def poll(cls, context):
657 return (context.material or context.object) and CyclesButtonsPanel.poll(context)
659 def draw(self, context):
662 mat = context.material
664 slot = context.material_slot
665 space = context.space_data
668 is_sortable = len(ob.material_slots) > 1
675 row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=rows)
677 col = row.column(align=True)
678 col.operator("object.material_slot_add", icon='ZOOMIN', text="")
679 col.operator("object.material_slot_remove", icon='ZOOMOUT', text="")
681 col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")
686 col.operator("object.material_slot_move", icon='TRIA_UP', text="").direction = 'UP'
687 col.operator("object.material_slot_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
689 if ob.mode == 'EDIT':
690 row = layout.row(align=True)
691 row.operator("object.material_slot_assign", text="Assign")
692 row.operator("object.material_slot_select", text="Select")
693 row.operator("object.material_slot_deselect", text="Deselect")
695 split = layout.split(percentage=0.65)
698 split.template_ID(ob, "active_material", new="material.new")
702 row.prop(slot, "link", text="")
706 split.template_ID(space, "pin_id")
710 class CyclesObject_PT_motion_blur(CyclesButtonsPanel, Panel):
711 bl_label = "Motion Blur"
712 bl_context = "object"
713 bl_options = {'DEFAULT_CLOSED'}
716 def poll(cls, context):
718 if CyclesButtonsPanel.poll(context) and ob:
719 if ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META'}:
721 if ob.dupli_type == 'GROUP' and ob.dupli_group:
723 # TODO(sergey): More duplicator types here?
726 def draw_header(self, context):
729 rd = context.scene.render
730 # scene = context.scene
732 layout.active = rd.use_motion_blur
737 layout.prop(cob, "use_motion_blur", text="")
739 def draw(self, context):
742 rd = context.scene.render
743 # scene = context.scene
748 layout.active = (rd.use_motion_blur and cob.use_motion_blur)
751 row.prop(cob, "use_deform_motion", text="Deformation")
754 sub.active = cob.use_deform_motion
755 sub.prop(cob, "motion_steps", text="Steps")
758 class CyclesObject_PT_cycles_settings(CyclesButtonsPanel, Panel):
759 bl_label = "Cycles Settings"
760 bl_context = "object"
761 bl_options = {'DEFAULT_CLOSED'}
764 def poll(cls, context):
766 return (CyclesButtonsPanel.poll(context) and
767 ob and ((ob.type in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META', 'LAMP'}) or
768 (ob.dupli_type == 'GROUP' and ob.dupli_group)))
770 def draw(self, context):
773 scene = context.scene
774 cscene = scene.cycles
777 visibility = ob.cycles_visibility
779 layout.label(text="Ray Visibility:")
780 flow = layout.column_flow()
782 flow.prop(visibility, "camera")
783 flow.prop(visibility, "diffuse")
784 flow.prop(visibility, "glossy")
785 flow.prop(visibility, "transmission")
786 flow.prop(visibility, "scatter")
788 if ob.type != 'LAMP':
789 flow.prop(visibility, "shadow")
791 col = layout.column()
792 col.label(text="Performance:")
795 sub.active = scene.render.use_simplify and cscene.use_camera_cull
796 sub.prop(cob, "use_camera_cull")
799 sub.active = scene.render.use_simplify and cscene.use_distance_cull
800 sub.prop(cob, "use_distance_cull")
803 class CYCLES_OT_use_shading_nodes(Operator):
804 """Enable nodes on a material, world or lamp"""
805 bl_idname = "cycles.use_shading_nodes"
806 bl_label = "Use Nodes"
809 def poll(cls, context):
810 return (getattr(context, "material", False) or getattr(context, "world", False) or
811 getattr(context, "lamp", False))
813 def execute(self, context):
815 context.material.use_nodes = True
817 context.world.use_nodes = True
819 context.lamp.use_nodes = True
824 def find_node(material, nodetype):
825 if material and material.node_tree:
826 ntree = material.node_tree
828 active_output_node = None
829 for node in ntree.nodes:
830 if getattr(node, "type", None) == nodetype:
831 if getattr(node, "is_active_output", True):
833 if not active_output_node:
834 active_output_node = node
835 return active_output_node
840 def find_node_input(node, name):
841 for input in node.inputs:
842 if input.name == name:
848 def panel_node_draw(layout, id_data, output_type, input_name):
849 if not id_data.use_nodes:
850 layout.operator("cycles.use_shading_nodes", icon='NODETREE')
853 ntree = id_data.node_tree
855 node = find_node(id_data, output_type)
857 layout.label(text="No output node")
859 input = find_node_input(node, input_name)
860 layout.template_node_view(ntree, node, input)
865 class CyclesLamp_PT_preview(CyclesButtonsPanel, Panel):
868 bl_options = {'DEFAULT_CLOSED'}
871 def poll(cls, context):
872 return context.lamp and \
873 not (context.lamp.type == 'AREA' and
874 context.lamp.cycles.is_portal) \
875 and CyclesButtonsPanel.poll(context)
877 def draw(self, context):
878 self.layout.template_preview(context.lamp)
881 class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
886 def poll(cls, context):
887 return context.lamp and CyclesButtonsPanel.poll(context)
889 def draw(self, context):
894 # cscene = context.scene.cycles
896 layout.prop(lamp, "type", expand=True)
898 split = layout.split()
899 col = split.column(align=True)
901 if lamp.type in {'POINT', 'SUN', 'SPOT'}:
902 col.prop(lamp, "shadow_soft_size", text="Size")
903 elif lamp.type == 'AREA':
904 col.prop(lamp, "shape", text="")
905 sub = col.column(align=True)
907 if lamp.shape == 'SQUARE':
908 sub.prop(lamp, "size")
909 elif lamp.shape == 'RECTANGLE':
910 sub.prop(lamp, "size", text="Size X")
911 sub.prop(lamp, "size_y", text="Size Y")
913 if not (lamp.type == 'AREA' and clamp.is_portal):
914 sub = col.column(align=True)
915 if use_branched_path(context):
916 subsub = sub.row(align=True)
917 subsub.active = use_sample_all_lights(context)
918 subsub.prop(clamp, "samples")
919 sub.prop(clamp, "max_bounces")
923 sub = col.column(align=True)
924 sub.active = not (lamp.type == 'AREA' and clamp.is_portal)
925 sub.prop(clamp, "cast_shadow")
926 sub.prop(clamp, "use_multiple_importance_sampling", text="Multiple Importance")
928 if lamp.type == 'AREA':
929 col.prop(clamp, "is_portal", text="Portal")
931 if lamp.type == 'HEMI':
932 layout.label(text="Not supported, interpreted as sun lamp")
935 class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel):
940 def poll(cls, context):
941 return context.lamp and not (context.lamp.type == 'AREA' and
942 context.lamp.cycles.is_portal) and \
943 CyclesButtonsPanel.poll(context)
945 def draw(self, context):
949 if not panel_node_draw(layout, lamp, 'OUTPUT_LAMP', 'Surface'):
950 layout.prop(lamp, "color")
953 class CyclesLamp_PT_spot(CyclesButtonsPanel, Panel):
954 bl_label = "Spot Shape"
958 def poll(cls, context):
960 return (lamp and lamp.type == 'SPOT') and CyclesButtonsPanel.poll(context)
962 def draw(self, context):
967 split = layout.split()
971 sub.prop(lamp, "spot_size", text="Size")
972 sub.prop(lamp, "spot_blend", text="Blend", slider=True)
975 col.prop(lamp, "show_cone")
978 class CyclesWorld_PT_preview(CyclesButtonsPanel, Panel):
981 bl_options = {'DEFAULT_CLOSED'}
984 def poll(cls, context):
985 return context.world and CyclesButtonsPanel.poll(context)
987 def draw(self, context):
988 self.layout.template_preview(context.world)
991 class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
996 def poll(cls, context):
997 return context.world and CyclesButtonsPanel.poll(context)
999 def draw(self, context):
1000 layout = self.layout
1002 world = context.world
1004 if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'):
1005 layout.prop(world, "horizon_color", text="Color")
1008 class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
1010 bl_context = "world"
1011 bl_options = {'DEFAULT_CLOSED'}
1014 def poll(cls, context):
1015 world = context.world
1016 return world and world.node_tree and CyclesButtonsPanel.poll(context)
1018 def draw(self, context):
1019 layout = self.layout
1021 world = context.world
1022 panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume')
1025 class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
1026 bl_label = "Ambient Occlusion"
1027 bl_context = "world"
1030 def poll(cls, context):
1031 return context.world and CyclesButtonsPanel.poll(context)
1033 def draw_header(self, context):
1034 light = context.world.light_settings
1035 self.layout.prop(light, "use_ambient_occlusion", text="")
1037 def draw(self, context):
1038 layout = self.layout
1040 light = context.world.light_settings
1044 sub.active = light.use_ambient_occlusion
1045 sub.prop(light, "ao_factor", text="Factor")
1046 row.prop(light, "distance", text="Distance")
1049 class CyclesWorld_PT_mist(CyclesButtonsPanel, Panel):
1050 bl_label = "Mist Pass"
1051 bl_context = "world"
1052 bl_options = {'DEFAULT_CLOSED'}
1055 def poll(cls, context):
1056 if CyclesButtonsPanel.poll(context):
1058 for rl in context.scene.render.layers:
1059 if rl.use_pass_mist:
1064 def draw(self, context):
1065 layout = self.layout
1067 world = context.world
1069 split = layout.split(align=True)
1070 split.prop(world.mist_settings, "start")
1071 split.prop(world.mist_settings, "depth")
1073 layout.prop(world.mist_settings, "falloff")
1076 class CyclesWorld_PT_ray_visibility(CyclesButtonsPanel, Panel):
1077 bl_label = "Ray Visibility"
1078 bl_context = "world"
1079 bl_options = {'DEFAULT_CLOSED'}
1082 def poll(cls, context):
1083 return CyclesButtonsPanel.poll(context) and context.world
1085 def draw(self, context):
1086 layout = self.layout
1088 world = context.world
1089 visibility = world.cycles_visibility
1091 flow = layout.column_flow()
1093 flow.prop(visibility, "camera")
1094 flow.prop(visibility, "diffuse")
1095 flow.prop(visibility, "glossy")
1096 flow.prop(visibility, "transmission")
1097 flow.prop(visibility, "scatter")
1100 class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
1101 bl_label = "Settings"
1102 bl_context = "world"
1103 bl_options = {'DEFAULT_CLOSED'}
1106 def poll(cls, context):
1107 return context.world and CyclesButtonsPanel.poll(context)
1109 def draw(self, context):
1110 layout = self.layout
1112 world = context.world
1113 cworld = world.cycles
1114 # cscene = context.scene.cycles
1116 split = layout.split()
1118 col = split.column()
1120 col.label(text="Surface:")
1121 col.prop(cworld, "sample_as_light", text="Multiple Importance")
1123 sub = col.column(align=True)
1124 sub.active = cworld.sample_as_light
1125 sub.prop(cworld, "sample_map_resolution")
1126 if use_branched_path(context):
1127 subsub = sub.row(align=True)
1128 subsub.active = use_sample_all_lights(context)
1129 subsub.prop(cworld, "samples")
1130 sub.prop(cworld, "max_bounces")
1132 col = split.column()
1133 col.label(text="Volume:")
1135 sub.active = use_cpu(context)
1136 sub.prop(cworld, "volume_sampling", text="")
1137 sub.prop(cworld, "volume_interpolation", text="")
1138 col.prop(cworld, "homogeneous_volume", text="Homogeneous")
1141 class CyclesMaterial_PT_preview(CyclesButtonsPanel, Panel):
1142 bl_label = "Preview"
1143 bl_context = "material"
1144 bl_options = {'DEFAULT_CLOSED'}
1147 def poll(cls, context):
1148 return context.material and CyclesButtonsPanel.poll(context)
1150 def draw(self, context):
1151 self.layout.template_preview(context.material)
1154 class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
1155 bl_label = "Surface"
1156 bl_context = "material"
1159 def poll(cls, context):
1160 return context.material and CyclesButtonsPanel.poll(context)
1162 def draw(self, context):
1163 layout = self.layout
1165 mat = context.material
1166 if not panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Surface'):
1167 layout.prop(mat, "diffuse_color")
1170 class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
1172 bl_context = "material"
1173 bl_options = {'DEFAULT_CLOSED'}
1176 def poll(cls, context):
1177 mat = context.material
1178 return mat and mat.node_tree and CyclesButtonsPanel.poll(context)
1180 def draw(self, context):
1181 layout = self.layout
1183 mat = context.material
1186 panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Volume')
1189 class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel):
1190 bl_label = "Displacement"
1191 bl_context = "material"
1194 def poll(cls, context):
1195 mat = context.material
1196 return mat and mat.node_tree and CyclesButtonsPanel.poll(context)
1198 def draw(self, context):
1199 layout = self.layout
1201 mat = context.material
1202 panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Displacement')
1205 class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
1206 bl_label = "Settings"
1207 bl_context = "material"
1208 bl_options = {'DEFAULT_CLOSED'}
1211 def poll(cls, context):
1212 return context.material and CyclesButtonsPanel.poll(context)
1214 def draw(self, context):
1215 layout = self.layout
1217 mat = context.material
1220 split = layout.split()
1221 col = split.column()
1222 col.label(text="Surface:")
1223 col.prop(cmat, "sample_as_light", text="Multiple Importance")
1224 col.prop(cmat, "use_transparent_shadow")
1226 if context.scene.cycles.feature_set == 'EXPERIMENTAL':
1228 col.label(text="Displacement:")
1229 col.prop(cmat, "displacement_method", text="")
1231 col = split.column()
1232 col.label(text="Volume:")
1234 sub.active = use_cpu(context)
1235 sub.prop(cmat, "volume_sampling", text="")
1236 sub.prop(cmat, "volume_interpolation", text="")
1237 col.prop(cmat, "homogeneous_volume", text="Homogeneous")
1240 split = layout.split()
1242 col = split.column(align=True)
1243 col.label("Viewport Color:")
1244 col.prop(mat, "diffuse_color", text="")
1245 col.prop(mat, "alpha")
1248 col.label("Viewport Alpha:")
1249 col.prop(mat.game_settings, "alpha_blend", text="")
1251 col = split.column(align=True)
1252 col.label("Viewport Specular:")
1253 col.prop(mat, "specular_color", text="")
1254 col.prop(mat, "specular_hardness", text="Hardness")
1257 col.prop(mat, "pass_index")
1260 class CyclesTexture_PT_context(CyclesButtonsPanel, Panel):
1262 bl_context = "texture"
1263 bl_options = {'HIDE_HEADER'}
1264 COMPAT_ENGINES = {'CYCLES'}
1266 def draw(self, context):
1267 layout = self.layout
1269 tex = context.texture
1270 space = context.space_data
1271 pin_id = space.pin_id
1272 use_pin_id = space.use_pin_id
1273 user = context.texture_user
1275 space.use_limited_texture_context = False
1277 if not (use_pin_id and isinstance(pin_id, bpy.types.Texture)):
1281 layout.template_texture_user()
1286 split = layout.split(percentage=0.65)
1287 col = split.column()
1290 col.template_ID(space, "pin_id")
1292 propname = context.texture_user_property.identifier
1293 col.template_ID(user, propname, new="texture.new")
1296 split = layout.split(percentage=0.2)
1297 split.label(text="Type:")
1298 split.prop(tex, "type", text="")
1301 class CyclesTexture_PT_node(CyclesButtonsPanel, Panel):
1303 bl_context = "texture"
1306 def poll(cls, context):
1307 node = context.texture_node
1308 return node and CyclesButtonsPanel.poll(context)
1310 def draw(self, context):
1311 layout = self.layout
1313 node = context.texture_node
1314 ntree = node.id_data
1315 layout.template_node_view(ntree, node, None)
1318 class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel):
1319 bl_label = "Mapping"
1320 bl_context = "texture"
1323 def poll(cls, context):
1324 node = context.texture_node
1325 # TODO(sergey): perform a faster/nicer check?
1326 return node and hasattr(node, 'texture_mapping') and CyclesButtonsPanel.poll(context)
1328 def draw(self, context):
1329 layout = self.layout
1331 node = context.texture_node
1333 mapping = node.texture_mapping
1335 layout.prop(mapping, "vector_type", expand=True)
1339 row.column().prop(mapping, "translation")
1340 row.column().prop(mapping, "rotation")
1341 row.column().prop(mapping, "scale")
1343 layout.label(text="Projection:")
1346 row.prop(mapping, "mapping_x", text="")
1347 row.prop(mapping, "mapping_y", text="")
1348 row.prop(mapping, "mapping_z", text="")
1351 class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel):
1353 bl_context = "texture"
1354 bl_options = {'DEFAULT_CLOSED'}
1357 def poll(cls, context):
1358 # node = context.texture_node
1360 # return node and CyclesButtonsPanel.poll(context)
1362 def draw(self, context):
1363 layout = self.layout
1365 node = context.texture_node
1367 mapping = node.color_mapping
1369 split = layout.split()
1371 col = split.column()
1372 col.label(text="Blend:")
1373 col.prop(mapping, "blend_type", text="")
1374 col.prop(mapping, "blend_factor", text="Factor")
1375 col.prop(mapping, "blend_color", text="")
1377 col = split.column()
1378 col.label(text="Adjust:")
1379 col.prop(mapping, "brightness")
1380 col.prop(mapping, "contrast")
1381 col.prop(mapping, "saturation")
1385 layout.prop(mapping, "use_color_ramp", text="Ramp")
1386 if mapping.use_color_ramp:
1387 layout.template_color_ramp(mapping, "color_ramp", expand=True)
1390 class CyclesParticle_PT_textures(CyclesButtonsPanel, Panel):
1391 bl_label = "Textures"
1392 bl_context = "particle"
1393 bl_options = {'DEFAULT_CLOSED'}
1396 def poll(cls, context):
1397 psys = context.particle_system
1398 return psys and CyclesButtonsPanel.poll(context)
1400 def draw(self, context):
1401 layout = self.layout
1403 psys = context.particle_system
1404 part = psys.settings
1407 row.template_list("TEXTURE_UL_texslots", "", part, "texture_slots", part, "active_texture_index", rows=2)
1409 col = row.column(align=True)
1410 col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP'
1411 col.operator("texture.slot_move", text="", icon='TRIA_DOWN').type = 'DOWN'
1412 col.menu("TEXTURE_MT_specials", icon='DOWNARROW_HLT', text="")
1414 if not part.active_texture:
1415 layout.template_ID(part, "active_texture", new="texture.new")
1417 slot = part.texture_slots[part.active_texture_index]
1418 layout.template_ID(slot, "texture", new="texture.new")
1421 class CyclesRender_PT_bake(CyclesButtonsPanel, Panel):
1423 bl_context = "render"
1424 bl_options = {'DEFAULT_CLOSED'}
1425 COMPAT_ENGINES = {'CYCLES'}
1427 def draw(self, context):
1428 layout = self.layout
1430 scene = context.scene
1431 cscene = scene.cycles
1432 cbk = scene.render.bake
1434 layout.operator("object.bake", icon='RENDER_STILL').type = cscene.bake_type
1436 col = layout.column()
1437 col.prop(cscene, "bake_type")
1439 col = layout.column()
1441 if cscene.bake_type == 'NORMAL':
1442 col.prop(cbk, "normal_space", text="Space")
1444 row = col.row(align=True)
1445 row.label(text="Swizzle:")
1446 row.prop(cbk, "normal_r", text="")
1447 row.prop(cbk, "normal_g", text="")
1448 row.prop(cbk, "normal_b", text="")
1450 elif cscene.bake_type == 'COMBINED':
1451 row = col.row(align=True)
1452 row.prop(cbk, "use_pass_direct", toggle=True)
1453 row.prop(cbk, "use_pass_indirect", toggle=True)
1456 split.active = cbk.use_pass_direct or cbk.use_pass_indirect
1458 col = split.column()
1459 col.prop(cbk, "use_pass_diffuse")
1460 col.prop(cbk, "use_pass_glossy")
1461 col.prop(cbk, "use_pass_transmission")
1463 col = split.column()
1464 col.prop(cbk, "use_pass_subsurface")
1465 col.prop(cbk, "use_pass_ambient_occlusion")
1466 col.prop(cbk, "use_pass_emit")
1468 elif cscene.bake_type in {'DIFFUSE', 'GLOSSY', 'TRANSMISSION', 'SUBSURFACE'}:
1469 row = col.row(align=True)
1470 row.prop(cbk, "use_pass_direct", toggle=True)
1471 row.prop(cbk, "use_pass_indirect", toggle=True)
1472 row.prop(cbk, "use_pass_color", toggle=True)
1476 split = layout.split()
1478 col = split.column()
1479 col.prop(cbk, "margin")
1480 col.prop(cbk, "use_clear")
1482 col = split.column()
1483 col.prop(cbk, "use_selected_to_active")
1485 sub.active = cbk.use_selected_to_active
1486 sub.prop(cbk, "use_cage", text="Cage")
1488 sub.prop(cbk, "cage_extrusion", text="Extrusion")
1489 sub.prop_search(cbk, "cage_object", scene, "objects", text="")
1491 sub.prop(cbk, "cage_extrusion", text="Ray Distance")
1494 class CyclesRender_PT_debug(CyclesButtonsPanel, Panel):
1496 bl_context = "render"
1497 bl_options = {'DEFAULT_CLOSED'}
1498 COMPAT_ENGINES = {'CYCLES'}
1501 def poll(cls, context):
1502 return CyclesButtonsPanel.poll(context) and bpy.app.debug_value == 256
1504 def draw(self, context):
1505 layout = self.layout
1507 scene = context.scene
1508 cscene = scene.cycles
1510 col = layout.column()
1512 col.label('CPU Flags:')
1513 row = col.row(align=True)
1514 row.prop(cscene, "debug_use_cpu_sse2", toggle=True)
1515 row.prop(cscene, "debug_use_cpu_sse3", toggle=True)
1516 row.prop(cscene, "debug_use_cpu_sse41", toggle=True)
1517 row.prop(cscene, "debug_use_cpu_avx", toggle=True)
1518 row.prop(cscene, "debug_use_cpu_avx2", toggle=True)
1519 col.prop(cscene, "debug_use_qbvh")
1521 col = layout.column()
1522 col.label('CUDA Flags:')
1523 col.prop(cscene, "debug_use_cuda_adaptive_compile")
1525 col = layout.column()
1526 col.label('OpenCL Flags:')
1527 col.prop(cscene, "debug_opencl_kernel_type", text="Kernel")
1528 col.prop(cscene, "debug_opencl_device_type", text="Device")
1529 col.prop(cscene, "debug_use_opencl_debug", text="Debug")
1532 class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel):
1533 bl_label = "Cycles Hair Settings"
1534 bl_context = "particle"
1537 def poll(cls, context):
1538 scene = context.scene
1539 ccscene = scene.cycles_curves
1540 psys = context.particle_system
1541 use_curves = ccscene.use_curves and psys
1542 return CyclesButtonsPanel.poll(context) and use_curves and psys.settings.type == 'HAIR'
1544 def draw(self, context):
1545 layout = self.layout
1547 psys = context.particle_settings
1551 row.prop(cpsys, "shape", text="Shape")
1553 layout.label(text="Thickness:")
1555 row.prop(cpsys, "root_width", text="Root")
1556 row.prop(cpsys, "tip_width", text="Tip")
1559 row.prop(cpsys, "radius_scale", text="Scaling")
1560 row.prop(cpsys, "use_closetip", text="Close tip")
1563 class CyclesScene_PT_simplify(CyclesButtonsPanel, Panel):
1564 bl_label = "Simplify"
1565 bl_context = "scene"
1566 COMPAT_ENGINES = {'CYCLES'}
1568 def draw_header(self, context):
1569 rd = context.scene.render
1570 self.layout.prop(rd, "use_simplify", text="")
1572 def draw(self, context):
1573 layout = self.layout
1575 scene = context.scene
1577 cscene = scene.cycles
1579 layout.active = rd.use_simplify
1581 col = layout.column(align=True)
1582 col.label(text="Subdivision")
1583 row = col.row(align=True)
1584 row.prop(rd, "simplify_subdivision", text="Viewport")
1585 row.prop(rd, "simplify_subdivision_render", text="Render")
1588 col = layout.column(align=True)
1589 col.label(text="Child Particles")
1590 row = col.row(align=True)
1591 row.prop(rd, "simplify_child_particles", text="Viewport")
1592 row.prop(rd, "simplify_child_particles_render", text="Render")
1594 col = layout.column(align=True)
1596 sub = split.column()
1597 sub.label(text="Texture Limit Viewport")
1598 sub.prop(cscene, "texture_limit", text="")
1599 sub = split.column()
1600 sub.label(text="Texture Limit Render")
1601 sub.prop(cscene, "texture_limit_render", text="")
1603 split = layout.split()
1604 col = split.column()
1605 col.prop(cscene, "use_camera_cull")
1607 row.active = cscene.use_camera_cull
1608 row.prop(cscene, "camera_cull_margin")
1610 col = split.column()
1611 col.prop(cscene, "use_distance_cull")
1613 row.active = cscene.use_distance_cull
1614 row.prop(cscene, "distance_cull_margin", text="Distance")
1616 def draw_device(self, context):
1617 scene = context.scene
1618 layout = self.layout
1620 if scene.render.engine == 'CYCLES':
1621 from . import engine
1622 cscene = scene.cycles
1624 layout.prop(cscene, "feature_set")
1626 split = layout.split(percentage=1/3)
1627 split.label("Device:")
1629 row.active = show_device_selection(context)
1630 row.prop(cscene, "device", text="")
1632 if engine.with_osl() and use_cpu(context):
1633 layout.prop(cscene, "shading_system")
1636 def draw_pause(self, context):
1637 layout = self.layout
1638 scene = context.scene
1640 if scene.render.engine == "CYCLES":
1641 view = context.space_data
1643 if view.viewport_shade == 'RENDERED':
1644 cscene = scene.cycles
1645 layername = scene.render.layers.active.name
1646 layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
1647 layout.prop(cscene, "preview_active_layer", icon="RENDERLAYERS", text=layername)
1653 'DATA_PT_camera_dof',
1654 'DATA_PT_falloff_curve',
1660 'MATERIAL_PT_context_material',
1661 'MATERIAL_PT_diffuse',
1662 'MATERIAL_PT_flare',
1664 'MATERIAL_PT_mirror',
1665 'MATERIAL_PT_options',
1666 'MATERIAL_PT_pipeline',
1667 'MATERIAL_PT_preview',
1668 'MATERIAL_PT_shading',
1669 'MATERIAL_PT_shadow',
1670 'MATERIAL_PT_specular',
1672 'MATERIAL_PT_strand',
1673 'MATERIAL_PT_transp',
1674 'MATERIAL_PT_volume_density',
1675 'MATERIAL_PT_volume_integration',
1676 'MATERIAL_PT_volume_lighting',
1677 'MATERIAL_PT_volume_options',
1678 'MATERIAL_PT_volume_shading',
1679 'MATERIAL_PT_volume_transp',
1680 'RENDERLAYER_PT_layer_options',
1681 'RENDERLAYER_PT_layer_passes',
1682 'RENDERLAYER_PT_views',
1683 'RENDER_PT_antialiasing',
1685 'RENDER_PT_motion_blur',
1686 'RENDER_PT_performance',
1687 'RENDER_PT_post_processing',
1688 'RENDER_PT_shading',
1689 'SCENE_PT_simplify',
1690 'TEXTURE_PT_context_texture',
1691 'WORLD_PT_ambient_occlusion',
1692 'WORLD_PT_environment_lighting',
1694 'WORLD_PT_indirect_lighting',
1701 for panel in bpy.types.Panel.__subclasses__():
1702 if hasattr(panel, 'COMPAT_ENGINES') and 'BLENDER_RENDER' in panel.COMPAT_ENGINES:
1703 if panel.__name__ not in exclude_panels:
1704 panels.append(panel)
1709 bpy.types.RENDER_PT_render.append(draw_device)
1710 bpy.types.VIEW3D_HT_header.append(draw_pause)
1712 for panel in get_panels():
1713 panel.COMPAT_ENGINES.add('CYCLES')
1716 bpy.types.RENDER_PT_render.remove(draw_device)
1717 bpy.types.VIEW3D_HT_header.remove(draw_pause)
1719 for panel in get_panels():
1720 if 'CYCLES' in panel.COMPAT_ENGINES:
1721 panel.COMPAT_ENGINES.remove('CYCLES')