Commit: d760a6ed54956362d8883c4650d8a9779221413b
Author: Campbell Barton
Date: Wed Dec 19 11:23:21 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBd760a6ed54956362d8883c4650d8a9779221413b
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.
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
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):
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs