2012-10-28 16:09:51 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
#
|
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
|
|
|
|
|
|
|
|
# <pep8 compliant>
|
|
|
|
|
import bpy
|
2014-04-25 05:31:20 +10:00
|
|
|
from bpy.types import Panel, UIList
|
2012-10-28 16:09:51 +00:00
|
|
|
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class ViewLayerButtonsPanel:
|
2012-10-28 16:09:51 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
2017-11-22 10:52:39 -02:00
|
|
|
bl_context = "view_layer"
|
2012-10-28 16:09:51 +00:00
|
|
|
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2012-10-28 16:09:51 +00:00
|
|
|
|
|
|
|
|
|
2018-04-24 15:20:17 +02:00
|
|
|
class VIEWLAYER_PT_layer(ViewLayerButtonsPanel, Panel):
|
|
|
|
|
bl_label = "View Layer"
|
2018-04-16 14:07:42 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
|
2012-10-28 16:09:51 +00:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
2017-10-16 17:59:09 -02:00
|
|
|
rd = scene.render
|
2018-04-24 15:20:17 +02:00
|
|
|
layer = bpy.context.view_layer
|
2012-10-28 16:09:51 +00:00
|
|
|
|
2018-04-24 15:20:17 +02:00
|
|
|
layout.prop(layer, "use", text="Use for Rendering");
|
|
|
|
|
layout.prop(rd, "use_single_layer", text="Render Single Layer")
|
2012-10-28 16:09:51 +00:00
|
|
|
|
2012-10-29 23:11:55 +00:00
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_clay_settings(ViewLayerButtonsPanel, Panel):
|
2017-05-05 16:27:31 +02:00
|
|
|
bl_label = "Render Settings"
|
|
|
|
|
COMPAT_ENGINES = {'BLENDER_CLAY'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-05-05 16:27:31 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_CLAY']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-05-05 16:27:31 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_CLAY']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "ssao_samples")
|
|
|
|
|
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_ambient_occlusion(ViewLayerButtonsPanel, Panel):
|
2017-10-03 18:30:36 +02:00
|
|
|
bl_label = "Ambient Occlusion"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2017-05-10 15:58:18 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-05-10 15:58:18 +02:00
|
|
|
|
2017-10-03 18:30:36 +02:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-10-03 18:30:36 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
self.layout.template_override_property(layer_props, scene_props, "gtao_enable", text="")
|
|
|
|
|
|
2017-05-10 15:58:18 +02:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-05-10 15:58:18 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-10-03 18:30:36 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_use_bent_normals")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_bounce")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_distance")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_factor")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_quality")
|
2017-05-10 15:58:18 +02:00
|
|
|
|
2017-05-11 14:30:33 +02:00
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_motion_blur(ViewLayerButtonsPanel, Panel):
|
2017-10-03 18:30:36 +02:00
|
|
|
bl_label = "Motion Blur"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2017-05-10 15:58:18 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-05-10 15:58:18 +02:00
|
|
|
|
2017-10-03 18:30:36 +02:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-10-03 18:30:36 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
self.layout.template_override_property(layer_props, scene_props, "motion_blur_enable", text="")
|
|
|
|
|
|
2017-05-10 15:58:18 +02:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-05-10 15:58:18 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "motion_blur_samples")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "motion_blur_shutter")
|
|
|
|
|
|
2017-10-03 18:30:36 +02:00
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_depth_of_field(ViewLayerButtonsPanel, Panel):
|
2017-10-03 18:30:36 +02:00
|
|
|
bl_label = "Depth Of Field"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-10-03 18:30:36 +02:00
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-10-03 18:30:36 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
self.layout.template_override_property(layer_props, scene_props, "dof_enable", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-10-03 18:30:36 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-05-10 15:58:18 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "bokeh_max_size")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "bokeh_threshold")
|
|
|
|
|
|
2017-10-03 18:30:36 +02:00
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_bloom(ViewLayerButtonsPanel, Panel):
|
2017-10-03 18:30:36 +02:00
|
|
|
bl_label = "Bloom"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-10-03 18:30:36 +02:00
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-10-03 18:30:36 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
self.layout.template_override_property(layer_props, scene_props, "bloom_enable", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-10-03 18:30:36 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-05-10 15:58:18 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_threshold")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_knee")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_radius")
|
2017-08-19 02:40:02 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_color")
|
2017-05-10 15:58:18 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_intensity")
|
2017-08-19 02:39:16 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_clamp")
|
2017-05-10 15:58:18 +02:00
|
|
|
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_volumetric(ViewLayerButtonsPanel, Panel):
|
2017-07-05 14:44:43 +02:00
|
|
|
bl_label = "Volumetric"
|
2017-10-03 18:30:36 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2017-07-05 14:44:43 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-07-05 14:44:43 +02:00
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-07-05 14:44:43 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
self.layout.template_override_property(layer_props, scene_props, "volumetric_enable", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-07-05 14:44:43 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-07-05 19:23:57 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_start")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_end")
|
2017-10-24 14:49:00 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_tile_size")
|
2017-07-05 19:23:57 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_samples")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_sample_distribution")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_lights")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_light_clamp")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_shadows")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_shadow_samples")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_colored_transmittance")
|
2017-07-05 14:44:43 +02:00
|
|
|
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_subsurface_scattering(ViewLayerButtonsPanel, Panel):
|
2017-11-14 00:49:54 +01:00
|
|
|
bl_label = "Subsurface Scattering"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-11-14 00:49:54 +01:00
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-11-14 00:49:54 +01:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
self.layout.template_override_property(layer_props, scene_props, "sss_enable", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-11-14 00:49:54 +01:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-11-14 02:17:34 +01:00
|
|
|
col.template_override_property(layer_props, scene_props, "sss_samples")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "sss_jitter_threshold")
|
2017-11-24 22:29:18 +01:00
|
|
|
col.template_override_property(layer_props, scene_props, "sss_separate_albedo")
|
2017-11-14 00:49:54 +01:00
|
|
|
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_screen_space_reflections(ViewLayerButtonsPanel, Panel):
|
2017-07-24 11:18:11 +02:00
|
|
|
bl_label = "Screen Space Reflections"
|
2017-10-03 18:30:36 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2017-07-16 23:49:25 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-07-16 23:49:25 +02:00
|
|
|
|
2017-07-24 11:18:11 +02:00
|
|
|
def draw_header(self, context):
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-07-24 11:18:11 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
self.layout.template_override_property(layer_props, scene_props, "ssr_enable", text="")
|
|
|
|
|
|
2017-07-16 23:49:25 +02:00
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-07-16 23:49:25 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-07-22 01:13:33 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_halfres")
|
2017-08-09 16:54:18 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_refraction")
|
2017-07-30 17:11:05 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_quality")
|
2017-07-31 15:18:22 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_max_roughness")
|
2017-07-21 23:48:48 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_thickness")
|
2017-07-22 14:41:34 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_border_fade")
|
2017-07-24 11:18:11 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_firefly_fac")
|
2017-07-16 23:49:25 +02:00
|
|
|
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_shadows(ViewLayerButtonsPanel, Panel):
|
2017-09-01 15:59:58 +02:00
|
|
|
bl_label = "Shadows"
|
2017-10-03 18:30:36 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2017-09-01 15:59:58 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-09-01 15:59:58 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-09-01 15:59:58 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "shadow_method")
|
2018-05-04 14:39:05 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "shadow_cube_size")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "shadow_cascade_size")
|
2017-09-02 02:27:28 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "shadow_high_bitdepth")
|
2017-09-01 15:59:58 +02:00
|
|
|
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_sampling(ViewLayerButtonsPanel, Panel):
|
2017-10-03 18:30:36 +02:00
|
|
|
bl_label = "Sampling"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2017-09-25 20:14:07 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-09-25 20:14:07 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-09-25 20:14:07 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "taa_samples")
|
2018-01-29 19:39:07 +01:00
|
|
|
col.template_override_property(layer_props, scene_props, "taa_render_samples")
|
2018-04-20 18:20:39 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "taa_reprojection")
|
2017-09-25 20:14:07 +02:00
|
|
|
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class VIEWLAYER_PT_eevee_indirect_lighting(ViewLayerButtonsPanel, Panel):
|
2017-10-03 18:30:36 +02:00
|
|
|
bl_label = "Indirect Lighting"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2017-10-01 02:19:10 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
2018-04-17 13:35:05 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2017-10-01 02:19:10 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
scene = context.scene
|
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = bpy.context.view_layer
|
2017-10-01 02:19:10 +02:00
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "gi_diffuse_bounces")
|
2017-12-02 13:01:40 +01:00
|
|
|
col.template_override_property(layer_props, scene_props, "gi_cubemap_resolution")
|
|
|
|
|
col.template_override_property(layer_props, scene_props, "gi_visibility_resolution")
|
2017-10-01 02:19:10 +02:00
|
|
|
|
|
|
|
|
|
2018-01-29 21:59:34 +01:00
|
|
|
class VIEWLAYER_PT_eevee_layer_passes(ViewLayerButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Passes"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
|
rd = scene.render
|
2018-04-24 15:20:17 +02:00
|
|
|
view_layer = context.view_layer
|
2018-01-29 21:59:34 +01:00
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
col.prop(view_layer, "use_pass_combined")
|
|
|
|
|
col.prop(view_layer, "use_pass_z")
|
2018-02-01 18:09:06 +01:00
|
|
|
col.prop(view_layer, "use_pass_mist")
|
2018-01-31 01:09:38 +01:00
|
|
|
col.prop(view_layer, "use_pass_normal")
|
2018-02-03 00:00:19 +01:00
|
|
|
col.separator()
|
|
|
|
|
col.prop(view_layer, "use_pass_ambient_occlusion")
|
2018-01-29 21:59:34 +01:00
|
|
|
|
2018-01-31 21:17:27 +01:00
|
|
|
col = split.column()
|
|
|
|
|
col.label(text="Subsurface:")
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_subsurface_direct", text="Direct", toggle=True)
|
|
|
|
|
row.prop(view_layer, "use_pass_subsurface_color", text="Color", toggle=True)
|
|
|
|
|
|
2018-01-29 21:59:34 +01:00
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
classes = (
|
2018-04-24 15:20:17 +02:00
|
|
|
VIEWLAYER_PT_layer,
|
2017-11-22 10:52:39 -02:00
|
|
|
VIEWLAYER_PT_clay_settings,
|
|
|
|
|
VIEWLAYER_PT_eevee_sampling,
|
|
|
|
|
VIEWLAYER_PT_eevee_shadows,
|
|
|
|
|
VIEWLAYER_PT_eevee_indirect_lighting,
|
|
|
|
|
VIEWLAYER_PT_eevee_subsurface_scattering,
|
|
|
|
|
VIEWLAYER_PT_eevee_screen_space_reflections,
|
|
|
|
|
VIEWLAYER_PT_eevee_ambient_occlusion,
|
|
|
|
|
VIEWLAYER_PT_eevee_volumetric,
|
|
|
|
|
VIEWLAYER_PT_eevee_motion_blur,
|
|
|
|
|
VIEWLAYER_PT_eevee_depth_of_field,
|
|
|
|
|
VIEWLAYER_PT_eevee_bloom,
|
2018-01-29 21:59:34 +01:00
|
|
|
VIEWLAYER_PT_eevee_layer_passes,
|
2017-03-18 20:03:24 +11:00
|
|
|
)
|
|
|
|
|
|
2012-10-28 16:09:51 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
|
for cls in classes:
|
|
|
|
|
register_class(cls)
|