diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-15 13:03:26 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-15 13:03:49 +0300 |
commit | 0819013eb45532e2ac26c725d09a4c74478e85d7 (patch) | |
tree | 008428ac7ef93d078bbdea1c7319aa0ba0387fc2 /release | |
parent | cf1a945e5ad570e9ae159b569a2a3cfc11874f98 (diff) |
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.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_material.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 7 |
2 files changed, 7 insertions, 1 deletions
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) |