Combine all Proportional Editing options under one menu
authorJulian Eisel <eiseljulian@gmail.com>
Sun, 4 Sep 2016 21:40:41 +0000 (23:40 +0200)
committerJulian Eisel <eiseljulian@gmail.com>
Sun, 4 Sep 2016 22:27:11 +0000 (00:27 +0200)
Image of the result of this patch:

{F352849}

The only thing different from the above image and this patch is I added a colon after "Falloff" after I took the screen shot.

Reviewers: Severin, meta-androcto

Subscribers: plyczkowski

Tags: #bf_blender, #user_interface

Maniphest Tasks: T33436

Differential Revision: https://developer.blender.org/D2195

release/scripts/startup/bl_ui/space_view3d.py

index c1d1e2284a9ee63fb9736bff36709ee52897ef0d..53d9ba0c8164a02c95497ef9a1bcbbb99041438c 100644 (file)
@@ -411,6 +411,20 @@ class VIEW3D_MT_uv_map(Menu):
         layout.operator("uv.reset")
 
 
+class VIEW3D_MT_edit_proportional(Menu):
+    bl_label = "Proportional Editing"
+
+    def draw(self, context):
+        layout = self.layout
+
+        layout.props_enum(context.tool_settings,"proportional_edit")
+
+        layout.separator()
+
+        layout.label("Falloff:")
+        layout.props_enum(context.tool_settings,"proportional_edit_falloff")
+
+
 # ********** View menus **********
 
 
@@ -2311,8 +2325,7 @@ class VIEW3D_MT_edit_mesh(Menu):
         layout.separator()
 
         layout.prop(toolsettings, "use_mesh_automerge")
-        layout.prop_menu_enum(toolsettings, "proportional_edit")
-        layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
+        layout.menu("VIEW3D_MT_edit_proportional")
 
         layout.separator()
 
@@ -2684,8 +2697,7 @@ def draw_curve(self, context):
 
     layout.separator()
 
-    layout.prop_menu_enum(toolsettings, "proportional_edit")
-    layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
+    layout.menu("VIEW3D_MT_edit_proportional")
 
     layout.separator()
 
@@ -2844,8 +2856,7 @@ class VIEW3D_MT_edit_meta(Menu):
 
         layout.separator()
 
-        layout.prop_menu_enum(toolsettings, "proportional_edit")
-        layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
+        layout.menu("VIEW3D_MT_edit_proportional")
 
         layout.separator()
 
@@ -2882,8 +2893,7 @@ class VIEW3D_MT_edit_lattice(Menu):
 
         layout.separator()
 
-        layout.prop_menu_enum(toolsettings, "proportional_edit")
-        layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
+        layout.menu("VIEW3D_MT_edit_proportional")
 
 
 class VIEW3D_MT_edit_armature(Menu):
@@ -3043,8 +3053,7 @@ class VIEW3D_MT_edit_gpencil(Menu):
 
         layout.separator()
 
-        layout.prop_menu_enum(toolsettings, "proportional_edit")
-        layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
+        layout.menu("VIEW3D_MT_edit_proportional")
 
         layout.separator()