From 0819013eb45532e2ac26c725d09a4c74478e85d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 15 May 2019 12:03:26 +0200 Subject: Eevee: Add per material option to cull backfaces This is in order to have more flexibility and to have an explicit option for final renders. --- release/scripts/startup/bl_ui/properties_material.py | 1 + release/scripts/startup/bl_ui/space_view3d.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 79efd92f222..dde67e27f37 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -212,6 +212,7 @@ class EEVEE_MATERIAL_PT_settings(MaterialButtonsPanel, Panel): mat = context.material + layout.prop(mat, "use_backface_culling") layout.prop(mat, "blend_method") layout.prop(mat, "shadow_method") diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 88a6f0b9b9a..1b833d0a8c3 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5082,6 +5082,11 @@ class VIEW3D_PT_shading_options(Panel): bl_label = "Options" bl_parent_id = 'VIEW3D_PT_shading' + @classmethod + def poll(cls, context): + shading = VIEW3D_PT_shading.get_shading(context) + return shading.type in {'WIREFRAME', 'SOLID'} + def draw(self, context): layout = self.layout @@ -5089,7 +5094,7 @@ class VIEW3D_PT_shading_options(Panel): col = layout.column() - if shading.type != 'WIREFRAME': + if shading.type == 'SOLID': col.prop(shading, "show_backface_culling") row = col.row(align=True) -- cgit v1.2.3