[Bf-blender-cvs] [d6b5743] master: UI: move sharp/smooth out of vertex menu
Campbell Barton
noreply at git.blender.org
Sun May 10 07:26:21 CEST 2015
Commit: d6b57436efad545347b4403610dd3af642d4378d
Author: Campbell Barton
Date: Sun May 10 15:06:44 2015 +1000
Branches: master
https://developer.blender.org/rBd6b57436efad545347b4403610dd3af642d4378d
UI: move sharp/smooth out of vertex menu
Was confusing to have shade smooth/soft in both edge & vertex menu named differently.
This is an edge-flag, so keep in the edge-menu, use vertex option when in vertex mode.
===================================================================
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 59fc369..02acb82 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2277,13 +2277,6 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
layout.separator()
- op = layout.operator("mesh.mark_sharp", text="Shade Smooth")
- op.use_verts = True
- op.clear = True
- layout.operator("mesh.mark_sharp", text="Shade Sharp").use_verts = True
-
- layout.separator()
-
layout.operator("mesh.bevel").vertex_only = True
layout.operator("mesh.convex_hull")
layout.operator("mesh.vertices_smooth")
@@ -2306,6 +2299,8 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
def draw(self, context):
layout = self.layout
+ toolsettings = context.tool_settings
+
with_freestyle = bpy.app.build_options.freestyle
layout.operator_context = 'INVOKE_REGION_WIN'
@@ -2326,8 +2321,16 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
layout.separator()
- layout.operator("mesh.mark_sharp")
- layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
+ if not toolsettings.mesh_select_mode[0]:
+ # edge mode
+ layout.operator("mesh.mark_sharp")
+ layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
+ else:
+ # vert mode
+ layout.operator("mesh.mark_sharp").use_verts = True
+ props = layout.operator("mesh.mark_sharp", text="Clear Sharp")
+ props.use_verts = True
+ props.clear = True
layout.separator()
More information about the Bf-blender-cvs
mailing list