diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-09-21 15:10:06 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-09-21 16:45:03 +0300 |
commit | 3523958de9f129e260a8a31260ef9459a10cc3cc (patch) | |
tree | 62bf2a9bc2d397c1f75a1847beccf5c444c5fcac /release | |
parent | 6934b246d186ce612100cf1a540fd23bde171fc8 (diff) |
DRW: Add back wireframe mode
This is using the existing engine (workbench forward) with 0.0 xray_alpha
and forcing wireframes on all objects.
There is no workflow/shortcut changes in this commit.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 8f6f3f7f4bf..095bac456d2 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3963,6 +3963,11 @@ class VIEW3D_PT_shading_lighting(Panel): bl_label = "Lighting" bl_parent_id = 'VIEW3D_PT_shading' + @classmethod + def poll(cls, context): + shading = VIEW3D_PT_shading.get_shading(context) + return shading.type in {'SOLID', 'MATERIAL'} + def draw(self, context): layout = self.layout shading = VIEW3D_PT_shading.get_shading(context) @@ -4028,7 +4033,7 @@ class VIEW3D_PT_shading_color(Panel): @classmethod def poll(cls, context): shading = VIEW3D_PT_shading.get_shading(context) - return shading.type == 'SOLID' + return shading.type in {'WIREFRAME', 'SOLID'} def _draw_color_type(self, context): layout = self.layout @@ -4061,7 +4066,7 @@ class VIEW3D_PT_shading_options(Panel): @classmethod def poll(cls, context): shading = VIEW3D_PT_shading.get_shading(context) - return shading.type == 'SOLID' + return shading.type in {'WIREFRAME', 'SOLID'} def draw(self, context): layout = self.layout @@ -4079,34 +4084,35 @@ class VIEW3D_PT_shading_options(Panel): sub.active = is_xray sub.prop(shading, "xray_alpha", text="X-Ray") - row = col.row() - row.prop(shading, "show_shadows", text="") - row.active = not is_xray - sub = row.row(align=True) - sub.active = is_shadows - sub.prop(shading, "shadow_intensity", text="Shadow") - sub.popover( - panel="VIEW3D_PT_shading_options_shadow", - icon='SCRIPTWIN', - text="" - ) - - col = layout.column() - row = col.row() - row.active = not is_xray - row.prop(shading, "show_cavity") - - if shading.show_cavity: - sub = col.row(align=True) - sub.active = not shading.show_xray and shading.show_cavity - sub.prop(shading, "cavity_ridge_factor") - sub.prop(shading, "cavity_valley_factor") + if shading.type == 'SOLID': + row = col.row() + row.prop(shading, "show_shadows", text="") + row.active = not is_xray + sub = row.row(align=True) + sub.active = is_shadows + sub.prop(shading, "shadow_intensity", text="Shadow") sub.popover( - panel="VIEW3D_PT_shading_options_ssao", + panel="VIEW3D_PT_shading_options_shadow", icon='SCRIPTWIN', text="" ) + col = layout.column() + row = col.row() + row.active = not is_xray + row.prop(shading, "show_cavity") + + if shading.show_cavity: + sub = col.row(align=True) + sub.active = not shading.show_xray and shading.show_cavity + sub.prop(shading, "cavity_ridge_factor") + sub.prop(shading, "cavity_valley_factor") + sub.popover( + panel="VIEW3D_PT_shading_options_ssao", + icon='SCRIPTWIN', + text="" + ) + row = layout.split() row.prop(shading, "show_object_outline") sub = row.row() @@ -4114,7 +4120,7 @@ class VIEW3D_PT_shading_options(Panel): sub.prop(shading, "object_outline_color", text="") col = layout.column() - if not shading.light == 'MATCAP': + if shading.light not in {'WIREFRAME', 'MATCAP'}: col.prop(shading, "show_specular_highlight") |