diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-02-01 20:09:06 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-02-01 22:47:56 +0300 |
commit | e52c5bcdb56886a10a8aa432c240f2f74dc7c0a5 (patch) | |
tree | 7995e62157781e1a2b287b620bd84db89ab86118 /release/scripts | |
parent | 12bd214b9ae5acc1c68346f82cf7eedffba0b21f (diff) |
Eevee: Add mist pass support.
Eevee: Render: Fix crash when not enabling mist pass.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_view_layer.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_world.py | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index e4a59f0dba7..b58b034ca55 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -467,6 +467,7 @@ class VIEWLAYER_PT_eevee_layer_passes(ViewLayerButtonsPanel, Panel): col = split.column() col.prop(view_layer, "use_pass_combined") col.prop(view_layer, "use_pass_z") + col.prop(view_layer, "use_pass_mist") col.prop(view_layer, "use_pass_normal") col = split.column() diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index e56a7977791..48eed9acb3a 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -243,6 +243,33 @@ class WORLD_PT_mist(WorldButtonsPanel, Panel): layout.prop(world.mist_settings, "falloff") +class EEVEE_WORLD_PT_mist(WorldButtonsPanel, Panel): + bl_label = "Mist Pass" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_EEVEE'} + + @classmethod + def poll(cls, context): + engine = context.engine + if context.world and (engine in cls.COMPAT_ENGINES): + for view_layer in context.scene.view_layers: + if view_layer.use_pass_mist: + return True + + return False + + def draw(self, context): + layout = self.layout + + world = context.world + + split = layout.split(align=True) + split.prop(world.mist_settings, "start") + split.prop(world.mist_settings, "depth") + + layout.prop(world.mist_settings, "falloff") + + class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_EEVEE'} _context_path = "world" @@ -294,6 +321,7 @@ classes = ( WORLD_PT_mist, WORLD_PT_custom_props, EEVEE_WORLD_PT_surface, + EEVEE_WORLD_PT_mist, ) if __name__ == "__main__": # only for live edit. |