Removed a few operators that were just used to generate popup menus and replaced...
[blender-staging.git] / release / scripts / ui / space_view3d.py
index c8f10d692b456b61ff726182a4f5d9deee021b44..26f2953be40755e9a712befba0857e49793dbd8d 100644 (file)
@@ -216,6 +216,7 @@ class VIEW3D_MT_uv_map(dynamic_menu.DynMenu):
         layout.operator("uv.cylinder_project")
         layout.operator("uv.sphere_project")
         layout.operator("uv.project_from_view")
+        layout.operator("uv.project_from_view", text="Project from View (Bounds)").scale_to_bounds = True
 
         layout.separator()
 
@@ -455,6 +456,7 @@ class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
         layout.separator()
 
         layout.operator("mesh.select_random", text="Random...")
+        layout.operator("mesh.select_nth", text="Select Nth...")
         layout.operator("mesh.edges_select_sharp", text="Sharp Edges")
         layout.operator("mesh.faces_select_linked_flat", text="Linked Flat Faces")
         layout.operator("mesh.faces_select_interior", text="Interior Faces")
@@ -901,6 +903,24 @@ class VIEW3D_MT_particle(bpy.types.Menu):
         layout.menu("VIEW3D_MT_particle_showhide")
 
 
+class VIEW3D_MT_particle_specials(bpy.types.Menu):
+    bl_label = "Specials"
+
+    def draw(self, context):
+        layout = self.layout
+        particle_edit = context.tool_settings.particle_edit
+
+        layout.operator("particle.rekey")
+
+        layout.separator()
+        if particle_edit.selection_mode == 'POINT':
+            layout.operator("particle.subdivide")
+            layout.operator("particle.select_first")
+            layout.operator("particle.select_last")
+
+        layout.operator("particle.remove_doubles")
+
+
 class VIEW3D_MT_particle_showhide(VIEW3D_MT_showhide):
     _operator_name = "particle"
 
@@ -1120,6 +1140,28 @@ class VIEW3D_MT_edit_mesh_specials(bpy.types.Menu):
         layout.operator("mesh.select_vertex_path")
 
 
+class VIEW3D_MT_edit_mesh_selection_mode(bpy.types.Menu):
+    bl_label = "Mesh Select Mode"
+
+    def draw(self, context):
+        layout = self.layout
+
+        layout.operator_context = 'INVOKE_REGION_WIN'
+        path = "tool_settings.edit_select_vertex;tool_settings.edit_select_edge;tool_settings.edit_select_face"
+
+        prop = layout.operator("wm.context_set_value", text="Vertex")
+        prop.value = "(True, False, False)"
+        prop.path = "tool_settings.mesh_selection_mode"
+
+        prop = layout.operator("wm.context_set_value", text="Edge")
+        prop.value = "(False, True, False)"
+        prop.path = "tool_settings.mesh_selection_mode"
+
+        prop = layout.operator("wm.context_set_value", text="Face")
+        prop.value = "(False, False, True)"
+        prop.path = "tool_settings.mesh_selection_mode"
+
+
 class VIEW3D_MT_edit_mesh_vertices(bpy.types.Menu):
     bl_label = "Vertices"
 
@@ -1202,6 +1244,7 @@ class VIEW3D_MT_edit_mesh_faces(dynamic_menu.DynMenu):
         layout.operator("mesh.edge_face_add")
         layout.operator("mesh.fill")
         layout.operator("mesh.beauty_fill")
+        layout.operator("mesh.solidify")
 
         layout.separator()
 
@@ -1319,7 +1362,19 @@ class VIEW3D_MT_edit_curve_segments(bpy.types.Menu):
 
         layout.operator("curve.subdivide")
         layout.operator("curve.switch_direction")
+        
+class VIEW3D_MT_edit_curve_specials(bpy.types.Menu):
+    bl_label = "Specials"
 
+    def draw(self, context):
+        layout = self.layout
+
+        layout.operator("curve.subdivide")
+        layout.operator("curve.switch_direction")
+        layout.operator("curve.spline_weight_set")
+        layout.operator("curve.radius_set")
+        layout.operator("curve.smooth")
+        layout.operator("curve.smooth_radius")
 
 class VIEW3D_MT_edit_curve_showhide(VIEW3D_MT_showhide):
     _operator_name = "curve"
@@ -1580,10 +1635,6 @@ class VIEW3D_PT_3dview_properties(bpy.types.Panel):
 
         layout.column().prop(scene, "cursor_location", text="3D Cursor:")
 
-class VIEW3D_PT_3dview_item(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "Item"
 
 class VIEW3D_PT_3dview_name(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
@@ -1903,7 +1954,8 @@ bpy.types.register(VIEW3D_MT_sculpt) # Sculpt Menu
 
 bpy.types.register(VIEW3D_MT_paint_vertex)
 
-bpy.types.register(VIEW3D_MT_particle) # Particle Menu
+bpy.types.register(VIEW3D_MT_particle)# Particle Menu
+bpy.types.register(VIEW3D_MT_particle_specials)
 bpy.types.register(VIEW3D_MT_particle_showhide)
 
 bpy.types.register(VIEW3D_MT_pose) # POSE Menu
@@ -1917,6 +1969,7 @@ bpy.types.register(VIEW3D_MT_pose_showhide)
 
 bpy.types.register(VIEW3D_MT_edit_mesh)
 bpy.types.register(VIEW3D_MT_edit_mesh_specials) # Only as a menu for keybindings
+bpy.types.register(VIEW3D_MT_edit_mesh_selection_mode) # Only as a menu for keybindings
 bpy.types.register(VIEW3D_MT_edit_mesh_vertices)
 bpy.types.register(VIEW3D_MT_edit_mesh_edges)
 bpy.types.register(VIEW3D_MT_edit_mesh_faces)
@@ -1926,6 +1979,7 @@ bpy.types.register(VIEW3D_MT_edit_mesh_showhide)
 bpy.types.register(VIEW3D_MT_edit_curve)
 bpy.types.register(VIEW3D_MT_edit_curve_ctrlpoints)
 bpy.types.register(VIEW3D_MT_edit_curve_segments)
+bpy.types.register(VIEW3D_MT_edit_curve_specials)
 bpy.types.register(VIEW3D_MT_edit_curve_showhide)
 
 bpy.types.register(VIEW3D_MT_edit_surface)