Move EEVEE properties into scene
[blender.git] / release / scripts / startup / bl_ui / properties_render.py
1 # ##### BEGIN GPL LICENSE BLOCK #####
2
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 # ##### END GPL LICENSE BLOCK #####
19
20 # <pep8 compliant>
21 import bpy
22 from bpy.types import Menu, Panel, UIList
23
24
25 class RENDER_MT_presets(Menu):
26     bl_label = "Render Presets"
27     preset_subdir = "render"
28     preset_operator = "script.execute_preset"
29     draw = Menu.draw_preset
30
31
32 class RENDER_MT_ffmpeg_presets(Menu):
33     bl_label = "FFMPEG Presets"
34     preset_subdir = "ffmpeg"
35     preset_operator = "script.python_file_run"
36     draw = Menu.draw_preset
37
38
39 class RENDER_MT_framerate_presets(Menu):
40     bl_label = "Frame Rate Presets"
41     preset_subdir = "framerate"
42     preset_operator = "script.execute_preset"
43     draw = Menu.draw_preset
44
45
46 class RenderButtonsPanel:
47     bl_space_type = 'PROPERTIES'
48     bl_region_type = 'WINDOW'
49     bl_context = "render"
50     # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
51
52     @classmethod
53     def poll(cls, context):
54         return (context.engine in cls.COMPAT_ENGINES)
55
56
57 class RENDER_PT_context(Panel):
58     bl_space_type = 'PROPERTIES'
59     bl_region_type = 'WINDOW'
60     bl_context = "render"
61     bl_options = {'HIDE_HEADER'}
62     bl_label = ""
63
64     @classmethod
65     def poll(cls, context):
66         return context.scene
67
68     def draw(self, context):
69         layout = self.layout
70
71         scene = context.scene
72         rd = scene.render
73
74         if rd.has_multiple_engines:
75             layout.prop(rd, "engine", text="")
76
77
78 class RENDER_PT_render(RenderButtonsPanel, Panel):
79     bl_label = "Render"
80     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
81
82     def draw(self, context):
83         layout = self.layout
84
85         rd = context.scene.render
86
87         row = layout.row(align=True)
88         row.operator("render.render", text="Render", icon='RENDER_STILL')
89         row.operator("render.render", text="Animation", icon='RENDER_ANIMATION').animation = True
90         row.operator("sound.mixdown", text="Audio", icon='PLAY_AUDIO')
91
92         split = layout.split(percentage=0.33)
93
94         split.label(text="Display:")
95         row = split.row(align=True)
96         row.prop(rd, "display_mode", text="")
97         row.prop(rd, "use_lock_interface", icon_only=True)
98
99
100 class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
101     bl_label = "Dimensions"
102     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
103
104     _frame_rate_args_prev = None
105     _preset_class = None
106
107     @staticmethod
108     def _draw_framerate_label(*args):
109         # avoids re-creating text string each draw
110         if RENDER_PT_dimensions._frame_rate_args_prev == args:
111             return RENDER_PT_dimensions._frame_rate_ret
112
113         fps, fps_base, preset_label = args
114
115         if fps_base == 1.0:
116             fps_rate = round(fps)
117         else:
118             fps_rate = round(fps / fps_base, 2)
119
120         # TODO: Change the following to iterate over existing presets
121         custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 59.94, 60})
122
123         if custom_framerate is True:
124             fps_label_text = "Custom (%r fps)" % fps_rate
125             show_framerate = True
126         else:
127             fps_label_text = "%r fps" % fps_rate
128             show_framerate = (preset_label == "Custom")
129
130         RENDER_PT_dimensions._frame_rate_args_prev = args
131         RENDER_PT_dimensions._frame_rate_ret = args = (fps_label_text, show_framerate)
132         return args
133
134     @staticmethod
135     def draw_framerate(sub, rd):
136         if RENDER_PT_dimensions._preset_class is None:
137             RENDER_PT_dimensions._preset_class = bpy.types.RENDER_MT_framerate_presets
138
139         args = rd.fps, rd.fps_base, RENDER_PT_dimensions._preset_class.bl_label
140         fps_label_text, show_framerate = RENDER_PT_dimensions._draw_framerate_label(*args)
141
142         sub.menu("RENDER_MT_framerate_presets", text=fps_label_text)
143
144         if show_framerate:
145             sub.prop(rd, "fps")
146             sub.prop(rd, "fps_base", text="/")
147
148     def draw(self, context):
149         layout = self.layout
150
151         scene = context.scene
152         rd = scene.render
153
154         row = layout.row(align=True)
155         row.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label)
156         row.operator("render.preset_add", text="", icon='ZOOMIN')
157         row.operator("render.preset_add", text="", icon='ZOOMOUT').remove_active = True
158
159         split = layout.split()
160
161         col = split.column()
162         sub = col.column(align=True)
163         sub.label(text="Resolution:")
164         sub.prop(rd, "resolution_x", text="X")
165         sub.prop(rd, "resolution_y", text="Y")
166         sub.prop(rd, "resolution_percentage", text="")
167
168         sub.label(text="Aspect Ratio:")
169         sub.prop(rd, "pixel_aspect_x", text="X")
170         sub.prop(rd, "pixel_aspect_y", text="Y")
171
172         row = col.row()
173         row.prop(rd, "use_border", text="Border")
174         sub = row.row()
175         sub.active = rd.use_border
176         sub.prop(rd, "use_crop_to_border", text="Crop")
177
178         col = split.column()
179         sub = col.column(align=True)
180         sub.label(text="Frame Range:")
181         sub.prop(scene, "frame_start")
182         sub.prop(scene, "frame_end")
183         sub.prop(scene, "frame_step")
184
185         sub.label(text="Frame Rate:")
186
187         self.draw_framerate(sub, rd)
188
189         subrow = sub.row(align=True)
190         subrow.label(text="Time Remapping:")
191         subrow = sub.row(align=True)
192         subrow.prop(rd, "frame_map_old", text="Old")
193         subrow.prop(rd, "frame_map_new", text="New")
194
195
196 class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
197     bl_label = "Post Processing"
198     bl_options = {'DEFAULT_CLOSED'}
199     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
200
201     def draw(self, context):
202         layout = self.layout
203
204         rd = context.scene.render
205
206         split = layout.split()
207
208         col = split.column()
209         col.prop(rd, "use_compositing")
210         col.prop(rd, "use_sequencer")
211
212         split.prop(rd, "dither_intensity", text="Dither", slider=True)
213
214
215 class RENDER_PT_stamp(RenderButtonsPanel, Panel):
216     bl_label = "Metadata"
217     bl_options = {'DEFAULT_CLOSED'}
218     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
219
220     def draw(self, context):
221         layout = self.layout
222
223         rd = context.scene.render
224
225         layout.prop(rd, "use_stamp")
226         col = layout.column()
227         col.active = rd.use_stamp
228         row = col.row()
229         row.prop(rd, "stamp_font_size", text="Font Size")
230         row.prop(rd, "use_stamp_labels", text="Draw Labels")
231
232         row = col.row()
233         row.column().prop(rd, "stamp_foreground", slider=True)
234         row.column().prop(rd, "stamp_background", slider=True)
235
236         layout.label("Enabled Metadata")
237         split = layout.split()
238
239         col = split.column()
240         col.prop(rd, "use_stamp_time", text="Time")
241         col.prop(rd, "use_stamp_date", text="Date")
242         col.prop(rd, "use_stamp_render_time", text="RenderTime")
243         col.prop(rd, "use_stamp_frame", text="Frame")
244         col.prop(rd, "use_stamp_scene", text="Scene")
245         col.prop(rd, "use_stamp_memory", text="Memory")
246
247         col = split.column()
248         col.prop(rd, "use_stamp_camera", text="Camera")
249         col.prop(rd, "use_stamp_lens", text="Lens")
250         col.prop(rd, "use_stamp_filename", text="Filename")
251         col.prop(rd, "use_stamp_frame_range", text="Frame range")
252         col.prop(rd, "use_stamp_marker", text="Marker")
253         col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip")
254
255         row = layout.split(percentage=0.2)
256         row.prop(rd, "use_stamp_note", text="Note")
257         sub = row.row()
258         sub.active = rd.use_stamp_note
259         sub.prop(rd, "stamp_note_text", text="")
260         if rd.use_sequencer:
261             layout.label("Sequencer:")
262             layout.prop(rd, "use_stamp_strip_meta")
263
264
265 class RENDER_PT_output(RenderButtonsPanel, Panel):
266     bl_label = "Output"
267     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
268
269     def draw(self, context):
270         layout = self.layout
271
272         rd = context.scene.render
273         image_settings = rd.image_settings
274         file_format = image_settings.file_format
275
276         layout.prop(rd, "filepath", text="")
277
278         split = layout.split()
279
280         col = split.column()
281         col.active = not rd.is_movie_format
282         col.prop(rd, "use_overwrite")
283         col.prop(rd, "use_placeholder")
284
285         col = split.column()
286         col.prop(rd, "use_file_extension")
287         col.prop(rd, "use_render_cache")
288
289         layout.template_image_settings(image_settings, color_management=False)
290         if rd.use_multiview:
291             layout.template_image_views(image_settings)
292
293
294 class RENDER_PT_encoding(RenderButtonsPanel, Panel):
295     bl_label = "Encoding"
296     bl_options = {'DEFAULT_CLOSED'}
297     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
298
299     @classmethod
300     def poll(cls, context):
301         rd = context.scene.render
302         return rd.image_settings.file_format in {'FFMPEG', 'XVID', 'H264', 'THEORA'}
303
304     def draw(self, context):
305         layout = self.layout
306
307         rd = context.scene.render
308         ffmpeg = rd.ffmpeg
309
310         layout.menu("RENDER_MT_ffmpeg_presets", text="Presets")
311
312         split = layout.split()
313         split.prop(rd.ffmpeg, "format")
314         split.prop(ffmpeg, "use_autosplit")
315
316         # Video:
317         layout.separator()
318         self.draw_vcodec(context)
319
320         # Audio:
321         layout.separator()
322         if ffmpeg.format != 'MP3':
323             layout.prop(ffmpeg, "audio_codec", text="Audio Codec")
324
325         if ffmpeg.audio_codec != 'NONE':
326             row = layout.row()
327             row.prop(ffmpeg, "audio_bitrate")
328             row.prop(ffmpeg, "audio_volume", slider=True)
329
330     def draw_vcodec(self, context):
331         """Video codec options."""
332         layout = self.layout
333         ffmpeg = context.scene.render.ffmpeg
334
335         needs_codec = ffmpeg.format in {'AVI', 'QUICKTIME', 'MKV', 'OGG', 'MPEG4'}
336         if needs_codec:
337             layout.prop(ffmpeg, "codec")
338
339         if needs_codec and ffmpeg.codec == 'NONE':
340             return
341
342         if ffmpeg.codec in {'DNXHD'}:
343             layout.prop(ffmpeg, "use_lossless_output")
344
345         # Output quality
346         use_crf = needs_codec and ffmpeg.codec in {'H264', 'MPEG4', 'WEBM'}
347         if use_crf:
348             layout.prop(ffmpeg, "constant_rate_factor")
349
350         # Encoding speed
351         layout.prop(ffmpeg, "ffmpeg_preset")
352         # I-frames
353         layout.prop(ffmpeg, "gopsize")
354         # B-Frames
355         row = layout.row()
356         row.prop(ffmpeg, "use_max_b_frames", text="Max B-frames")
357         pbox = row.split()
358         pbox.prop(ffmpeg, "max_b_frames", text="")
359         pbox.enabled = ffmpeg.use_max_b_frames
360
361         if not use_crf or ffmpeg.constant_rate_factor == 'NONE':
362             split = layout.split()
363             col = split.column()
364             col.label(text="Rate:")
365             col.prop(ffmpeg, "video_bitrate")
366             col.prop(ffmpeg, "minrate", text="Minimum")
367             col.prop(ffmpeg, "maxrate", text="Maximum")
368             col.prop(ffmpeg, "buffersize", text="Buffer")
369
370             col = split.column()
371             col.label(text="Mux:")
372             col.prop(ffmpeg, "muxrate", text="Rate")
373             col.prop(ffmpeg, "packetsize", text="Packet Size")
374
375
376 class RENDER_UL_renderviews(UIList):
377     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
378         view = item
379         if self.layout_type in {'DEFAULT', 'COMPACT'}:
380             if view.name in {'left', 'right'}:
381                 layout.label(view.name, icon_value=icon + (not view.use))
382             else:
383                 layout.prop(view, "name", text="", index=index, icon_value=icon, emboss=False)
384             layout.prop(view, "use", text="", index=index)
385
386         elif self.layout_type == 'GRID':
387             layout.alignment = 'CENTER'
388             layout.label("", icon_value=icon + (not view.use))
389
390
391 class RENDER_PT_stereoscopy(RenderButtonsPanel, Panel):
392     bl_label = "Stereoscopy"
393     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
394     bl_options = {'DEFAULT_CLOSED'}
395
396     def draw_header(self, context):
397         rd = context.scene.render
398         self.layout.prop(rd, "use_multiview", text="")
399
400     def draw(self, context):
401         layout = self.layout
402
403         scene = context.scene
404         rd = scene.render
405         rv = rd.views.active
406
407         layout.active = rd.use_multiview
408         basic_stereo = rd.views_format == 'STEREO_3D'
409
410         row = layout.row()
411         row.prop(rd, "views_format", expand=True)
412
413         if basic_stereo:
414             row = layout.row()
415             row.template_list("RENDER_UL_renderviews", "name", rd, "stereo_views", rd.views, "active_index", rows=2)
416
417             row = layout.row()
418             row.label(text="File Suffix:")
419             row.prop(rv, "file_suffix", text="")
420
421         else:
422             row = layout.row()
423             row.template_list("RENDER_UL_renderviews", "name", rd, "views", rd.views, "active_index", rows=2)
424
425             col = row.column(align=True)
426             col.operator("scene.render_view_add", icon='ZOOMIN', text="")
427             col.operator("scene.render_view_remove", icon='ZOOMOUT', text="")
428
429             row = layout.row()
430             row.label(text="Camera Suffix:")
431             row.prop(rv, "camera_suffix", text="")
432
433
434 class RENDER_PT_clay_layer_settings(RenderButtonsPanel, Panel):
435     bl_label = "Clay Layer Settings"
436     COMPAT_ENGINES = {'BLENDER_CLAY'}
437
438     def draw(self, context):
439         layout = self.layout
440         props = context.scene.layer_properties['BLENDER_CLAY']
441
442         col = layout.column()
443         col.prop(props, "ssao_samples")
444
445
446 class RENDER_PT_clay_collection_settings(RenderButtonsPanel, Panel):
447     bl_label = "Clay Collection Settings"
448     COMPAT_ENGINES = {'BLENDER_CLAY'}
449
450     def draw(self, context):
451         layout = self.layout
452         props = context.scene.collection_properties['BLENDER_CLAY']
453
454         col = layout.column()
455         col.template_icon_view(props, "matcap_icon")
456         col.prop(props, "matcap_rotation")
457         col.prop(props, "matcap_hue")
458         col.prop(props, "matcap_saturation")
459         col.prop(props, "matcap_value")
460         col.prop(props, "ssao_factor_cavity")
461         col.prop(props, "ssao_factor_edge")
462         col.prop(props, "ssao_distance")
463         col.prop(props, "ssao_attenuation")
464         col.prop(props, "hair_brightness_randomness")
465
466
467 class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel):
468     bl_label = "Ambient Occlusion"
469     bl_options = {'DEFAULT_CLOSED'}
470     COMPAT_ENGINES = {'BLENDER_EEVEE'}
471
472     @classmethod
473     def poll(cls, context):
474         return (context.engine in cls.COMPAT_ENGINES)
475
476     def draw_header(self, context):
477         scene = context.scene
478         props = scene.eevee
479         self.layout.prop(props, "gtao_enable", text="")
480
481     def draw(self, context):
482         layout = self.layout
483         scene = context.scene
484         props = scene.eevee
485
486         layout.active = props.gtao_enable
487         col = layout.column()
488         col.prop(props, "gtao_use_bent_normals")
489         col.prop(props, "gtao_bounce")
490         col.prop(props, "gtao_distance")
491         col.prop(props, "gtao_factor")
492         col.prop(props, "gtao_quality")
493
494
495 class RENDER_PT_eevee_motion_blur(RenderButtonsPanel, Panel):
496     bl_label = "Motion Blur"
497     bl_options = {'DEFAULT_CLOSED'}
498     COMPAT_ENGINES = {'BLENDER_EEVEE'}
499
500     @classmethod
501     def poll(cls, context):
502         return (context.engine in cls.COMPAT_ENGINES)
503
504     def draw_header(self, context):
505         scene = context.scene
506         props = scene.eevee
507         self.layout.prop(props, "motion_blur_enable", text="")
508
509     def draw(self, context):
510         layout = self.layout
511         scene = context.scene
512         props = scene.eevee
513
514         layout.active = props.motion_blur_enable
515         col = layout.column()
516         col.prop(props, "motion_blur_samples")
517         col.prop(props, "motion_blur_shutter")
518
519
520 class RENDER_PT_eevee_depth_of_field(RenderButtonsPanel, Panel):
521     bl_label = "Depth of Field"
522     bl_options = {'DEFAULT_CLOSED'}
523     COMPAT_ENGINES = {'BLENDER_EEVEE'}
524
525     @classmethod
526     def poll(cls, context):
527         return (context.engine in cls.COMPAT_ENGINES)
528
529     def draw_header(self, context):
530         scene = context.scene
531         props = scene.eevee
532         self.layout.prop(props, "dof_enable", text="")
533
534     def draw(self, context):
535         layout = self.layout
536         scene = context.scene
537         props = scene.eevee
538
539         layout.active = props.dof_enable
540         col = layout.column()
541         col.prop(props, "bokeh_max_size")
542         col.prop(props, "bokeh_threshold")
543
544
545 class RENDER_PT_eevee_bloom(RenderButtonsPanel, Panel):
546     bl_label = "Bloom"
547     bl_options = {'DEFAULT_CLOSED'}
548     COMPAT_ENGINES = {'BLENDER_EEVEE'}
549
550     @classmethod
551     def poll(cls, context):
552         return (context.engine in cls.COMPAT_ENGINES)
553
554     def draw_header(self, context):
555         scene = context.scene
556         props = scene.eevee
557         self.layout.prop(props, "bloom_enable", text="")
558
559     def draw(self, context):
560         layout = self.layout
561         scene = context.scene
562         props = scene.eevee
563
564         layout.active = props.bloom_enable
565         col = layout.column()
566         col.prop(props, "bloom_threshold")
567         col.prop(props, "bloom_knee")
568         col.prop(props, "bloom_radius")
569         col.prop(props, "bloom_color")
570         col.prop(props, "bloom_intensity")
571         col.prop(props, "bloom_clamp")
572
573
574 class RENDER_PT_eevee_volumetric(RenderButtonsPanel, Panel):
575     bl_label = "Volumetric"
576     bl_options = {'DEFAULT_CLOSED'}
577     COMPAT_ENGINES = {'BLENDER_EEVEE'}
578
579     @classmethod
580     def poll(cls, context):
581         return (context.engine in cls.COMPAT_ENGINES)
582
583     def draw_header(self, context):
584         scene = context.scene
585         props = scene.eevee
586         self.layout.prop(props, "volumetric_enable", text="")
587
588     def draw(self, context):
589         layout = self.layout
590         scene = context.scene
591         props = scene.eevee
592
593         layout.active = props.volumetric_enable
594         col = layout.column()
595         col.prop(props, "volumetric_start")
596         col.prop(props, "volumetric_end")
597         col.prop(props, "volumetric_tile_size")
598         col.prop(props, "volumetric_samples")
599         col.prop(props, "volumetric_sample_distribution")
600         col.prop(props, "volumetric_lights")
601         col.prop(props, "volumetric_light_clamp")
602         col.prop(props, "volumetric_shadows")
603         col.prop(props, "volumetric_shadow_samples")
604         col.prop(props, "volumetric_colored_transmittance")
605
606
607 class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel):
608     bl_label = "Subsurface Scattering"
609     bl_options = {'DEFAULT_CLOSED'}
610     COMPAT_ENGINES = {'BLENDER_EEVEE'}
611
612     @classmethod
613     def poll(cls, context):
614         return (context.engine in cls.COMPAT_ENGINES)
615
616     def draw_header(self, context):
617         scene = context.scene
618         props = scene.eevee
619         self.layout.prop(props, "sss_enable", text="")
620
621     def draw(self, context):
622         layout = self.layout
623         scene = context.scene
624         props = scene.eevee
625
626         col = layout.column()
627         col.prop(props, "sss_samples")
628         col.prop(props, "sss_jitter_threshold")
629         col.prop(props, "sss_separate_albedo")
630
631
632 class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel):
633     bl_label = "Screen Space Reflections"
634     bl_options = {'DEFAULT_CLOSED'}
635     COMPAT_ENGINES = {'BLENDER_EEVEE'}
636
637     @classmethod
638     def poll(cls, context):
639         return (context.engine in cls.COMPAT_ENGINES)
640
641     def draw_header(self, context):
642         scene = context.scene
643         props = scene.eevee
644         self.layout.prop(props, "ssr_enable", text="")
645
646     def draw(self, context):
647         layout = self.layout
648         scene = context.scene
649         props = scene.eevee
650
651         col = layout.column()
652         col.active = props.ssr_enable
653         col.prop(props, "ssr_refraction")
654         col.prop(props, "ssr_halfres")
655         col.prop(props, "ssr_quality")
656         col.prop(props, "ssr_max_roughness")
657         col.prop(props, "ssr_thickness")
658         col.prop(props, "ssr_border_fade")
659         col.prop(props, "ssr_firefly_fac")
660
661
662 class RENDER_PT_eevee_shadows(RenderButtonsPanel, Panel):
663     bl_label = "Shadows"
664     bl_options = {'DEFAULT_CLOSED'}
665     COMPAT_ENGINES = {'BLENDER_EEVEE'}
666
667     @classmethod
668     def poll(cls, context):
669         return (context.engine in cls.COMPAT_ENGINES)
670
671     def draw(self, context):
672         layout = self.layout
673         scene = context.scene
674         props = scene.eevee
675
676         col = layout.column()
677         col.prop(props, "shadow_method")
678         col.prop(props, "shadow_cube_size")
679         col.prop(props, "shadow_cascade_size")
680         col.prop(props, "shadow_high_bitdepth")
681
682
683 class RENDER_PT_eevee_sampling(RenderButtonsPanel, Panel):
684     bl_label = "Sampling"
685     bl_options = {'DEFAULT_CLOSED'}
686     COMPAT_ENGINES = {'BLENDER_EEVEE'}
687
688     @classmethod
689     def poll(cls, context):
690         return (context.engine in cls.COMPAT_ENGINES)
691
692     def draw(self, context):
693         layout = self.layout
694         scene = context.scene
695         props = scene.eevee
696
697         col = layout.column()
698         col.prop(props, "taa_samples")
699         col.prop(props, "taa_render_samples")
700         col.prop(props, "taa_reprojection")
701
702
703 class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel):
704     bl_label = "Indirect Lighting"
705     bl_options = {'DEFAULT_CLOSED'}
706     COMPAT_ENGINES = {'BLENDER_EEVEE'}
707
708     @classmethod
709     def poll(cls, context):
710         return (context.engine in cls.COMPAT_ENGINES)
711
712     def draw(self, context):
713         layout = self.layout
714         scene = context.scene
715         props = scene.eevee
716
717         col = layout.column()
718         col.prop(props, "gi_diffuse_bounces")
719         col.prop(props, "gi_cubemap_resolution")
720         col.prop(props, "gi_visibility_resolution")
721
722
723 class RENDER_PT_eevee_film(RenderButtonsPanel, Panel):
724     bl_label = "Film"
725     bl_options = {'DEFAULT_CLOSED'}
726     COMPAT_ENGINES = {'BLENDER_EEVEE'}
727
728     @classmethod
729     def poll(cls, context):
730         return (context.engine in cls.COMPAT_ENGINES)
731
732     def draw(self, context):
733         layout = self.layout
734         scene = context.scene
735         rd = scene.render
736
737         split = layout.split()
738
739         col = split.column()
740         col.prop(rd, "filter_size")
741
742         col = split.column()
743         col.prop(rd, "alpha_mode", text="Alpha")
744
745
746 classes = (
747     RENDER_MT_presets,
748     RENDER_MT_ffmpeg_presets,
749     RENDER_MT_framerate_presets,
750     RENDER_PT_context,
751     RENDER_PT_render,
752     RENDER_PT_dimensions,
753     RENDER_PT_post_processing,
754     RENDER_PT_stamp,
755     RENDER_PT_output,
756     RENDER_PT_encoding,
757     RENDER_UL_renderviews,
758     RENDER_PT_stereoscopy,
759     RENDER_PT_clay_layer_settings,
760     RENDER_PT_clay_collection_settings,
761     RENDER_PT_eevee_sampling,
762     RENDER_PT_eevee_film,
763     RENDER_PT_eevee_shadows,
764     RENDER_PT_eevee_indirect_lighting,
765     RENDER_PT_eevee_subsurface_scattering,
766     RENDER_PT_eevee_screen_space_reflections,
767     RENDER_PT_eevee_ambient_occlusion,
768     RENDER_PT_eevee_volumetric,
769     RENDER_PT_eevee_motion_blur,
770     RENDER_PT_eevee_depth_of_field,
771     RENDER_PT_eevee_bloom,
772 )
773
774 if __name__ == "__main__":  # only for live edit.
775     from bpy.utils import register_class
776     for cls in classes:
777         register_class(cls)