Eevee: Add render properties and scene panel.

This commit is contained in:
Clément Foucault 2017-05-11 14:30:33 +02:00
parent 4edee280e4
commit 6fb568af79
3 changed files with 64 additions and 9 deletions

View File

@ -615,6 +615,58 @@ class RENDER_PT_clay_collection_settings(RenderButtonsPanel, Panel):
col.prop(props, "ssao_distance")
col.prop(props, "ssao_attenuation")
class RENDER_PT_eevee_poststack_settings(RenderButtonsPanel, Panel):
bl_label = "Post Process Stack"
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
col = layout.column()
col.prop(props, "motion_blur_enable")
col.prop(props, "dof_enable")
col.prop(props, "bloom_enable")
class RENDER_PT_eevee_postprocess_settings(RenderButtonsPanel, Panel):
bl_label = "Post Process Settings"
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
col = layout.column()
col.label("Motion Blur:")
col.prop(props, "motion_blur_samples")
col.prop(props, "motion_blur_shutter")
col.separator()
col.label("Depth of Field:")
col.prop(props, "bokeh_max_size")
col.prop(props, "bokeh_threshold")
col.separator()
col.label("Bloom:")
col.prop(props, "bloom_threshold")
col.prop(props, "bloom_knee")
col.prop(props, "bloom_radius")
col.prop(props, "bloom_intensity")
classes = (
RENDER_MT_presets,
@ -633,6 +685,8 @@ classes = (
RENDER_PT_bake,
RENDER_PT_clay_layer_settings,
RENDER_PT_clay_collection_settings,
RENDER_PT_eevee_poststack_settings,
RENDER_PT_eevee_postprocess_settings,
)
if __name__ == "__main__": # only for live edit.

View File

@ -171,6 +171,7 @@ class RENDERLAYER_PT_eevee_poststack_settings(RenderLayerButtonsPanel, Panel):
col.template_override_property(layer_props, scene_props, "dof_enable")
col.template_override_property(layer_props, scene_props, "bloom_enable")
class RENDERLAYER_PT_eevee_postprocess_settings(RenderLayerButtonsPanel, Panel):
bl_label = "Post Process Settings"
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@ -191,6 +192,7 @@ class RENDERLAYER_PT_eevee_postprocess_settings(RenderLayerButtonsPanel, Panel):
col.label("Motion Blur:")
col.template_override_property(layer_props, scene_props, "motion_blur_samples")
col.template_override_property(layer_props, scene_props, "motion_blur_shutter")
col.separator()
col.label("Depth of Field:")
col.template_override_property(layer_props, scene_props, "bokeh_max_size")
@ -202,7 +204,6 @@ class RENDERLAYER_PT_eevee_postprocess_settings(RenderLayerButtonsPanel, Panel):
col.template_override_property(layer_props, scene_props, "bloom_knee")
col.template_override_property(layer_props, scene_props, "bloom_radius")
col.template_override_property(layer_props, scene_props, "bloom_intensity")
col.separator()
classes = (

View File

@ -66,7 +66,7 @@ class SceneButtonsPanel:
class SCENE_PT_scene(SceneButtonsPanel, Panel):
bl_label = "Scene"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
def draw(self, context):
layout = self.layout
@ -81,7 +81,7 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel):
class SCENE_PT_unit(SceneButtonsPanel, Panel):
bl_label = "Units"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
def draw(self, context):
layout = self.layout
@ -166,7 +166,7 @@ class SceneKeyingSetsPanel:
class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
bl_label = "Keying Sets"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
def draw(self, context):
layout = self.layout
@ -199,7 +199,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
bl_label = "Active Keying Set"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
@ -256,7 +256,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
class SCENE_PT_color_management(SceneButtonsPanel, Panel):
bl_label = "Color Management"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
def draw(self, context):
layout = self.layout
@ -281,7 +281,7 @@ class SCENE_PT_color_management(SceneButtonsPanel, Panel):
class SCENE_PT_audio(SceneButtonsPanel, Panel):
bl_label = "Audio"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
def draw(self, context):
layout = self.layout
@ -409,7 +409,7 @@ class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel):
class SCENE_PT_simplify(SceneButtonsPanel, Panel):
bl_label = "Simplify"
COMPAT_ENGINES = {'BLENDER_RENDER'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
def draw_header(self, context):
rd = context.scene.render
@ -439,7 +439,7 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel):
class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
_context_path = "scene"
_property_type = bpy.types.Scene