diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-19 03:23:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-19 03:27:26 +0300 |
commit | d760a6ed54956362d8883c4650d8a9779221413b (patch) | |
tree | 2ad4f66091527c35248437ef42e460ecaf389e9a /release/scripts/startup/bl_ui/space_view3d.py | |
parent | a72220ecf097d9d23d64c5afc774fcedc353f81c (diff) |
UI: tweak shading popover
Show backface culling option even with rendered shading since it doesn't
yet support meshes two-sided option (noted as TODO).
Also correct bad string comparison.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index e8fb17258d1..825fd5f2a00 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -286,7 +286,10 @@ class VIEW3D_HT_header(Header): row = layout.row(align=True) row.prop(shading, "type", text="", expand=True) sub = row.row(align=True) - sub.enabled = shading.type != 'RENDERED' + # TODO, currently render shading type ignores mesh two-side, until it's supported + # show the shading popover which shows double-sided option. + + # sub.enabled = shading.type != 'RENDERED' sub.popover(panel="VIEW3D_PT_shading") @@ -4509,11 +4512,6 @@ 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 @@ -4521,6 +4519,9 @@ class VIEW3D_PT_shading_options(Panel): col = layout.column() + if shading.type != 'WIREFRAME': + col.prop(shading, "show_backface_culling") + row = col.row() if shading.type == 'WIREFRAME': @@ -4548,8 +4549,6 @@ class VIEW3D_PT_shading_options(Panel): col = layout.column() - col.prop(shading, "show_backface_culling") - row = col.row() row.active = not shading.show_xray row.prop(shading, "show_cavity") @@ -4574,15 +4573,16 @@ class VIEW3D_PT_shading_options(Panel): sub.prop(shading, "curvature_ridge_factor", text="Ridge") sub.prop(shading, "curvature_valley_factor", text="Valley") - row = layout.split() - row.prop(shading, "show_object_outline") - sub = row.row() - sub.active = shading.show_object_outline - sub.prop(shading, "object_outline_color", text="") + if shading.type in {'WIREFRAME', 'SOLID'}: + row = layout.split() + row.prop(shading, "show_object_outline") + sub = row.row() + sub.active = shading.show_object_outline + sub.prop(shading, "object_outline_color", text="") - col = layout.column() - if (shading.light == 'STUDIO') and (shading.type is not 'WIREFRAME'): - col.prop(shading, "show_specular_highlight", text="Specular Lighting") + col = layout.column() + if (shading.light == 'STUDIO') and (shading.type != 'WIREFRAME'): + col.prop(shading, "show_specular_highlight", text="Specular Lighting") class VIEW3D_PT_shading_options_shadow(Panel): |