Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-09-26 21:31:14 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-09-26 21:31:20 +0300
commit5732d9e1dcc08d284d7f9f56be22ad901fd53f22 (patch)
treeb95990cabfe96e39b8a14883c6166e10bd9918fb /release/scripts/startup/bl_ui/space_view3d.py
parentebd234eee5d7fdae6d7a5efa56171f6ab773a9e1 (diff)
Wireframe/Xray: Make Xray option local to wireframe mode
This commit make the Xray option for the wireframe different from the other shading mode. This makes it possible to rapidly switch between wireframe + Xray and Solid mode without Xray. Xray alpha is also decoupled. Both variables are duplicated and exposed separately through RNA.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index aaaa85a5e09..8a3442f35e5 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -261,6 +261,14 @@ class VIEW3D_HT_header(Header):
sub.active = overlay.show_overlays
sub.popover(panel="VIEW3D_PT_overlay")
+ row = layout.row()
+ row.active = (shading.type in {'WIREFRAME', 'SOLID'}) or object_mode in {'EDIT'}
+
+ if shading.type == 'WIREFRAME':
+ row.prop(shading, "show_xray_wireframe", text="", icon='ORTHO')
+ else:
+ row.prop(shading, "show_xray", text="", icon='ORTHO')
+
row = layout.row(align=True)
row.prop(shading, "type", text="", expand=True)
sub = row.row(align=True)
@@ -3786,7 +3794,10 @@ class VIEW3D_MT_shading_pie(Menu):
sub = pie.row()
sub.active = False
- sub.prop(view.shading, "show_xray", text="Toggle X-Ray", icon='ORTHO')
+ if view.shading.type == 'WIREFRAME':
+ sub.prop(view.shading, "show_xray_wireframe", text="Toggle X-Ray", icon='ORTHO')
+ else:
+ sub.prop(view.shading, "show_xray", text="Toggle X-Ray", icon='ORTHO')
pie.prop(view.overlay, "show_overlays", text="Toggle Overlays", icon='OVERLAY')
pie.prop_enum(view.shading, "type", value='MATERIAL')
@@ -4126,10 +4137,11 @@ class VIEW3D_PT_shading_options(Panel):
is_shadows = shading.show_shadows
row = col.row()
- row.prop(shading, "show_xray", text="")
- sub = row.row()
- sub.active = is_xray
- sub.prop(shading, "xray_alpha", text="X-Ray")
+ row.active = is_xray
+ if shading.type == 'WIREFRAME':
+ row.prop(shading, "xray_alpha_wireframe", text="X-Ray")
+ else:
+ row.prop(shading, "xray_alpha", text="X-Ray")
if shading.type == 'SOLID':
row = col.row()
@@ -4426,7 +4438,10 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
sub = split.column()
sub.prop(overlay, "show_faces", text="Faces")
sub = split.column()
- sub.active = shading.show_xray
+ if shading.type == 'WIREFRAME':
+ sub.active = shading.show_xray_wireframe
+ else:
+ sub.active = shading.show_xray
sub.prop(overlay, "show_face_center", text="Center")
row = col.row(align=True)