Removed a few operators that were just used to generate popup menus and replaced...
[blender-staging.git] / release / scripts / ui / space_view3d.py
index 01d428f0ce5baa52bbfde48dcf61654687f175a2..26f2953be40755e9a712befba0857e49793dbd8d 100644 (file)
@@ -27,17 +27,19 @@ class VIEW3D_HT_header(bpy.types.Header):
     def draw(self, context):
         layout = self.layout
 
-        view = context.space_data
+        view = context.space_data
         mode_string = context.mode
         edit_object = context.edit_object
-        object = context.active_object
+        obj = context.active_object
+        toolsettings = context.scene.tool_settings
 
-        row = layout.row(align=True)
+        row = layout.row()
         row.template_header()
 
+        sub = row.row(align=True)
+
         # Menus
         if context.area.show_menus:
-            sub = row.row(align=True)
 
             sub.menu("VIEW3D_MT_view")
 
@@ -47,13 +49,56 @@ class VIEW3D_HT_header(bpy.types.Header):
 
             if edit_object:
                 sub.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
-            elif object:
-                if mode_string not in ['PAINT_WEIGHT', 'PAINT_TEXTURE']:
+            elif obj:
+                if mode_string not in ('PAINT_WEIGHT', 'PAINT_TEXTURE'):
                     sub.menu("VIEW3D_MT_%s" % mode_string.lower())
             else:
                 sub.menu("VIEW3D_MT_object")
 
-        layout.template_header_3D()
+        row.template_header_3D()
+
+        # Particle edit
+        if obj and obj.mode == 'PARTICLE_EDIT':
+            row.prop(toolsettings.particle_edit, "selection_mode", text="", expand=True, toggle=True)
+
+        # Occlude geometry
+        if obj and view.viewport_shading in ('SOLID', 'SHADED', 'TEXTURED') and (obj.mode == 'PARTICLE_EDIT' or (obj.mode == 'EDIT' and obj.type == 'MESH')):
+            row.prop(view, "occlude_geometry", text="")
+
+        # Proportional editing
+        if obj and obj.mode in ('OBJECT', 'EDIT'):
+            row = layout.row(align=True)
+            row.prop(toolsettings, "proportional_editing", text="", icon_only=True)
+            if toolsettings.proportional_editing != 'DISABLED':
+                row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True)
+
+        # Snap
+        row = layout.row(align=True)
+        row.prop(toolsettings, "snap", text="")
+        row.prop(toolsettings, "snap_element", text="", icon_only=True)
+        if toolsettings.snap_element != 'INCREMENT':
+            row.prop(toolsettings, "snap_target", text="")
+            if obj and obj.mode == 'OBJECT':
+                row.prop(toolsettings, "snap_align_rotation", text="")
+        if toolsettings.snap_element == 'VOLUME':
+            row.prop(toolsettings, "snap_peel_object", text="")
+        elif toolsettings.snap_element == 'FACE':
+            row.prop(toolsettings, "snap_project", text="")
+
+        # OpenGL render
+        row = layout.row(align=True)
+        row.operator("screen.opengl_render", text="", icon='RENDER_STILL')
+        props = row.operator("screen.opengl_render", text="", icon='RENDER_ANIMATION')
+        props.animation = True
+
+        # Pose
+        if obj and obj.mode == 'POSE':
+            row = layout.row(align=True)
+            row.operator("pose.copy", text="", icon='COPYDOWN')
+            row.operator("pose.paste", text="", icon='PASTEDOWN')
+            props = row.operator("pose.paste", text="", icon='PASTEFLIPDOWN')
+            props.flipped = 1
+
 
 # ********** Menu **********
 
@@ -69,7 +114,7 @@ class VIEW3D_MT_showhide(bpy.types.Menu):
 
         layout.operator("%s.reveal" % self._operator_name, text="Show Hidden")
         layout.operator("%s.hide" % self._operator_name, text="Hide Selected")
-        layout.operator_boolean("%s.hide" % self._operator_name, "unselected", True, text="Hide Unselected")
+        layout.operator("%s.hide" % self._operator_name, text="Hide Unselected").unselected = True
 
 
 class VIEW3D_MT_transform(bpy.types.Menu):
@@ -78,69 +123,71 @@ class VIEW3D_MT_transform(bpy.types.Menu):
     # TODO: get rid of the custom text strings?
     def draw(self, context):
         layout = self.layout
-        
-        layout.operator("tfm.translate", text="Grab/Move")
+
+        layout.operator("transform.translate", text="Grab/Move")
         # TODO: sub-menu for grab per axis
-        layout.operator("tfm.rotate", text="Rotate")
+        layout.operator("transform.rotate", text="Rotate")
         # TODO: sub-menu for rot per axis
-        layout.operator("tfm.resize", text="Scale")
+        layout.operator("transform.resize", text="Scale")
         # TODO: sub-menu for scale per axis
-        
+
         layout.separator()
-        
-        layout.operator("tfm.tosphere", text="To Sphere")
-        layout.operator("tfm.shear", text="Shear")
-        layout.operator("tfm.warp", text="Warp")
-        layout.operator_enum("tfm.transform", "mode", 'PUSHPULL', text="Push/Pull")
+
+        layout.operator("transform.tosphere", text="To Sphere")
+        layout.operator("transform.shear", text="Shear")
+        layout.operator("transform.warp", text="Warp")
+        layout.operator("transform.transform", text="Push/Pull").mode = 'PUSHPULL'
         if context.edit_object and context.edit_object.type == 'ARMATURE':
             layout.operator("armature.align")
         else:
-            layout.operator_context = 'EXEC_AREA'
-            layout.operator_enum("tfm.transform", "mode", 'ALIGN', text="Align to Transform Orientation") # XXX see alignmenu() in edit.c of b2.4x to get this working
-        
+            layout.operator_context = 'EXEC_REGION_WIN'
+            layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN' # XXX see alignmenu() in edit.c of b2.4x to get this working
+
         layout.separator()
-        
+
         layout.operator_context = 'EXEC_AREA'
-        
-        layout.operator_enum("object.center_set", "type", 'CENTER')
-        layout.operator_enum("object.center_set", "type", 'CENTERNEW')
-        layout.operator_enum("object.center_set", "type", 'CENTERCURSOR')
-     
+
+        layout.operator("object.origin_set", text="Geometry to Origin").type = 'GEOMETRY_ORIGIN'
+        layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY'
+        layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR'
+
+
 class VIEW3D_MT_mirror(bpy.types.Menu):
     bl_label = "Mirror"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("tfm.mirror", text="Interactive Mirror")
-        
+        layout.operator("transform.mirror", text="Interactive Mirror")
+
         layout.separator()
-        
-        layout.operator_context = 'EXEC_AREA'
-        
-        props = layout.operator("tfm.mirror", properties=True, text="X Global")
+
+        layout.operator_context = 'INVOKE_REGION_WIN'
+
+        props = layout.operator("transform.mirror", text="X Global")
         props.constraint_axis = (True, False, False)
         props.constraint_orientation = 'GLOBAL'
-        props = layout.operator("tfm.mirror", properties=True, text="Y Global")
+        props = layout.operator("transform.mirror", text="Y Global")
         props.constraint_axis = (False, True, False)
         props.constraint_orientation = 'GLOBAL'
-        props = layout.operator("tfm.mirror", properties=True, text="Z Global")
+        props = layout.operator("transform.mirror", text="Z Global")
         props.constraint_axis = (False, False, True)
         props.constraint_orientation = 'GLOBAL'
-        
+
         if context.edit_object:
             layout.separator()
-            
-            props = layout.operator("tfm.mirror", properties=True, text="X Local")
+
+            props = layout.operator("transform.mirror", text="X Local")
             props.constraint_axis = (True, False, False)
             props.constraint_orientation = 'LOCAL'
-            props = layout.operator("tfm.mirror", properties=True, text="Y Local")
+            props = layout.operator("transform.mirror", text="Y Local")
             props.constraint_axis = (False, True, False)
             props.constraint_orientation = 'LOCAL'
-            props = layout.operator("tfm.mirror", properties=True, text="Z Local")
+            props = layout.operator("transform.mirror", text="Z Local")
             props.constraint_axis = (False, False, True)
             props.constraint_orientation = 'LOCAL'
-   
+
+
 class VIEW3D_MT_snap(bpy.types.Menu):
     bl_label = "Snap"
 
@@ -149,7 +196,7 @@ class VIEW3D_MT_snap(bpy.types.Menu):
 
         layout.operator("view3d.snap_selected_to_grid", text="Selection to Grid")
         layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor")
-        layout.operator("view3d.snap_selected_to_center", text="Selection to Center")
+        layout.operator("view3d.snap_selected_to_center", text="Selection to Origin")
 
         layout.separator()
 
@@ -169,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()
 
@@ -183,15 +231,15 @@ class VIEW3D_MT_view(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("view3d.properties", icon='ICON_MENU_PANEL')
-        layout.operator("view3d.toolbar", icon='ICON_MENU_PANEL')
+        layout.operator("view3d.properties", icon='MENU_PANEL')
+        layout.operator("view3d.toolbar", icon='MENU_PANEL')
 
         layout.separator()
 
-        layout.operator_enum("view3d.viewnumpad", "type", 'CAMERA')
-        layout.operator_enum("view3d.viewnumpad", "type", 'TOP')
-        layout.operator_enum("view3d.viewnumpad", "type", 'FRONT')
-        layout.operator_enum("view3d.viewnumpad", "type", 'RIGHT')
+        layout.operator("view3d.viewnumpad", text="Camera").type = 'CAMERA'
+        layout.operator("view3d.viewnumpad", text="Top").type = 'TOP'
+        layout.operator("view3d.viewnumpad", text="Front").type = 'FRONT'
+        layout.operator("view3d.viewnumpad", text="Right").type = 'RIGHT'
 
         layout.menu("VIEW3D_MT_view_cameras", text="Cameras")
 
@@ -213,7 +261,7 @@ class VIEW3D_MT_view(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator_int("view3d.layers", "nr", 0, text="Show All Layers")
+        layout.operator("view3d.layers", text="Show All Layers").nr = 0
 
         layout.separator()
 
@@ -223,12 +271,13 @@ class VIEW3D_MT_view(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("screen.region_foursplit", text="Toggle Quad View")
-        layout.operator("screen.screen_full_area", text="Toggle Full Screen")
+        layout.operator("screen.animation_play", text="Playback Animation")
 
         layout.separator()
 
-        layout.operator("screen.animation_play", text="Playback Animation", icon='ICON_PLAY')
+        layout.operator("screen.area_dupli")
+        layout.operator("screen.region_quadview")
+        layout.operator("screen.screen_full_area")
 
 
 class VIEW3D_MT_view_navigation(bpy.types.Menu):
@@ -245,8 +294,8 @@ class VIEW3D_MT_view_navigation(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator_float("view3d.zoom", "delta", 1.0, text="Zoom In")
-        layout.operator_float("view3d.zoom", "delta", -1.0, text="Zoom Out")
+        layout.operator("view3d.zoom", text="Zoom In").delta = 1
+        layout.operator("view3d.zoom", text="Zoom Out").delta = -1
 
         layout.separator()
 
@@ -263,7 +312,7 @@ class VIEW3D_MT_view_align(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator_boolean("view3d.view_all", "center", True, text="Center Cursor and View All")
+        layout.operator("view3d.view_all", text="Center Cursor and View All").center = True
         layout.operator("view3d.camera_to_view", text="Align Active Camera to View")
         layout.operator("view3d.view_center")
         layout.operator("view3d.view_center_cursor")
@@ -275,22 +324,22 @@ class VIEW3D_MT_view_align_selected(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
 
-        props = layout.operator("view3d.viewnumpad", properties=True, text="Top")
+        props = layout.operator("view3d.viewnumpad", text="Top")
         props.align_active = True
         props.type = 'TOP'
-        props = layout.operator("view3d.viewnumpad", properties=True, text="Bottom")
+        props = layout.operator("view3d.viewnumpad", text="Bottom")
         props.align_active = True
         props.type = 'BOTTOM'
-        props = layout.operator("view3d.viewnumpad", properties=True, text="Front")
+        props = layout.operator("view3d.viewnumpad", text="Front")
         props.align_active = True
         props.type = 'FRONT'
-        props = layout.operator("view3d.viewnumpad", properties=True, text="Back")
+        props = layout.operator("view3d.viewnumpad", text="Back")
         props.align_active = True
         props.type = 'BACK'
-        props = layout.operator("view3d.viewnumpad", properties=True, text="Right")
+        props = layout.operator("view3d.viewnumpad", text="Right")
         props.align_active = True
         props.type = 'RIGHT'
-        props = layout.operator("view3d.viewnumpad", properties=True, text="Left")
+        props = layout.operator("view3d.viewnumpad", text="Left")
         props.align_active = True
         props.type = 'LEFT'
 
@@ -302,7 +351,7 @@ class VIEW3D_MT_view_cameras(bpy.types.Menu):
         layout = self.layout
 
         layout.operator("view3d.object_as_camera")
-        layout.operator_enum("view3d.viewnumpad", "type", 'CAMERA', text="Active Camera")
+        layout.operator("view3d.viewnumpad", text="Active Camera").type = 'CAMERA'
 
 # ********** Select menus, suffix from context.mode **********
 
@@ -318,7 +367,7 @@ class VIEW3D_MT_select_object(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("object.select_all_toggle", text="Select/Deselect All")
+        layout.operator("object.select_all", text="Select/Deselect All")
         layout.operator("object.select_inverse", text="Inverse")
         layout.operator("object.select_random", text="Random")
         layout.operator("object.select_mirror", text="Mirror")
@@ -342,26 +391,28 @@ class VIEW3D_MT_select_pose(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("pose.select_all_toggle", text="Select/Deselect All")
+        layout.operator("pose.select_all", text="Select/Deselect All")
         layout.operator("pose.select_inverse", text="Inverse")
         layout.operator("pose.select_constraint_target", text="Constraint Target")
         layout.operator("pose.select_linked", text="Linked")
 
         layout.separator()
 
-        layout.operator_enum("pose.select_hierarchy", "direction", 'PARENT')
-        layout.operator_enum("pose.select_hierarchy", "direction", 'CHILD')
+        layout.operator("pose.select_hierarchy", text="Parent").direction = 'PARENT'
+        layout.operator("pose.select_hierarchy", text="Child").direction = 'CHILD'
 
         layout.separator()
 
-        props = layout.operator("pose.select_hierarchy", properties=True, text="Extend Parent")
+        props = layout.operator("pose.select_hierarchy", text="Extend Parent")
         props.extend = True
         props.direction = 'PARENT'
 
-        props = layout.operator("pose.select_hierarchy", properties=True, text="Extend Child")
+        props = layout.operator("pose.select_hierarchy", text="Extend Child")
         props.extend = True
         props.direction = 'CHILD'
 
+        layout.operator("object.select_pattern", text="Select Pattern...")
+
 
 class VIEW3D_MT_select_particle(bpy.types.Menu):
     bl_label = "Select"
@@ -373,7 +424,7 @@ class VIEW3D_MT_select_particle(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("particle.select_all_toggle", text="Select/Deselect All")
+        layout.operator("particle.select_all", text="Select/Deselect All")
         layout.operator("particle.select_linked")
         layout.operator("particle.select_inverse")
 
@@ -399,12 +450,13 @@ class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("mesh.select_all_toggle", text="Select/Deselect All")
+        layout.operator("mesh.select_all", text="Select/Deselect All")
         layout.operator("mesh.select_inverse", text="Inverse")
 
         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")
@@ -412,9 +464,9 @@ class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator_enum("mesh.select_by_number_vertices", "type", 'TRIANGLES', text="Triangles")
-        layout.operator_enum("mesh.select_by_number_vertices", "type", 'QUADS', text="Quads")
-        layout.operator_enum("mesh.select_by_number_vertices", "type", 'OTHER', text="Loose Verts/Edges")
+        layout.operator("mesh.select_by_number_vertices", text="Triangles").type = 'TRIANGLES'
+        layout.operator("mesh.select_by_number_vertices", text="Quads").type = 'QUADS'
+        layout.operator("mesh.select_by_number_vertices", text="Loose Verts/Edges").type = 'OTHER'
         layout.operator("mesh.select_similar", text="Similar...")
 
         layout.separator()
@@ -429,7 +481,7 @@ class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
         layout.operator("mesh.select_linked", text="Linked")
         layout.operator("mesh.select_vertex_path", text="Vertex Path")
         layout.operator("mesh.loop_multi_select", text="Edge Loop")
-        layout.operator_boolean("mesh.loop_multi_select", "ring", True, text="Edge Ring")
+        layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True
 
         layout.separator()
 
@@ -448,7 +500,7 @@ class VIEW3D_MT_select_edit_curve(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("curve.select_all_toggle", text="Select/Deselect All")
+        layout.operator("curve.select_all", text="Select/Deselect All")
         layout.operator("curve.select_inverse")
         layout.operator("curve.select_random")
         layout.operator("curve.select_every_nth")
@@ -477,7 +529,7 @@ class VIEW3D_MT_select_edit_surface(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("curve.select_all_toggle", text="Select/Deselect All")
+        layout.operator("curve.select_all", text="Select/Deselect All")
         layout.operator("curve.select_inverse")
         layout.operator("curve.select_random")
         layout.operator("curve.select_every_nth")
@@ -520,7 +572,7 @@ class VIEW3D_MT_select_edit_lattice(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("lattice.select_all_toggle", text="Select/Deselect All")
+        layout.operator("lattice.select_all", text="Select/Deselect All")
 
 
 class VIEW3D_MT_select_edit_armature(bpy.types.Menu):
@@ -534,31 +586,33 @@ class VIEW3D_MT_select_edit_armature(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("armature.select_all_toggle", text="Select/Deselect All")
+        layout.operator("armature.select_all", text="Select/Deselect All")
         layout.operator("armature.select_inverse", text="Inverse")
 
         layout.separator()
 
-        layout.operator_enum("armature.select_hierarchy", "direction", 'PARENT', text="Parent")
-        layout.operator_enum("armature.select_hierarchy", "direction", 'CHILD', text="Child")
+        layout.operator("armature.select_hierarchy", text="Parent").direction = 'PARENT'
+        layout.operator("armature.select_hierarchy", text="Child").direction = 'CHILD'
 
         layout.separator()
 
-        props = layout.operator("armature.select_hierarchy", properties=True, text="Extend Parent")
+        props = layout.operator("armature.select_hierarchy", text="Extend Parent")
         props.extend = True
         props.direction = 'PARENT'
 
-        props = layout.operator("armature.select_hierarchy", properties=True, text="Extend Child")
+        props = layout.operator("armature.select_hierarchy", text="Extend Child")
         props.extend = True
         props.direction = 'CHILD'
 
+        layout.operator("object.select_pattern", text="Select Pattern...")
+
 
 class VIEW3D_MT_select_face(bpy.types.Menu):# XXX no matching enum
     bl_label = "Select"
 
     def draw(self, context):
         layout = self.layout
-        
+
         # TODO
         # see view3d_select_faceselmenu
 
@@ -580,19 +634,18 @@ class VIEW3D_MT_object(bpy.types.Menu):
 
         layout.separator()
 
-        layout.operator("anim.insert_keyframe_menu", text="Insert Keyframe...")
-        layout.operator("anim.delete_keyframe_v3d", text="Delete Keyframe...")
+        layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...")
+        layout.operator("anim.keyframe_delete_v3d", text="Delete Keyframe...")
 
         layout.separator()
 
         layout.operator("object.duplicate_move")
-        layout.operator_boolean("object.duplicate", "linked", True, text="Duplicate Linked")
+        layout.operator("object.duplicate", text="Duplicate Linked").linked = True
         layout.operator("object.delete", text="Delete...")
         layout.operator("object.proxy_make", text="Make Proxy...")
         layout.menu("VIEW3D_MT_make_links", text="Make Links...")
         layout.operator_menu_enum("object.make_local", "type", text="Make Local...")
         layout.menu("VIEW3D_MT_make_single_user")
-        layout.menu("VIEW3D_MT_make_links")
 
         layout.separator()
 
@@ -603,6 +656,7 @@ class VIEW3D_MT_object(bpy.types.Menu):
 
         layout.separator()
 
+        layout.operator("object.join_shapes")
         layout.operator("object.join")
 
         layout.separator()
@@ -692,7 +746,7 @@ class VIEW3D_MT_object_showhide(bpy.types.Menu):
 
         layout.operator("object.restrictview_clear", text="Show Hidden")
         layout.operator("object.restrictview_set", text="Hide Selected")
-        layout.operator_boolean("object.restrictview_set", "unselected", True, text="Hide Unselected")
+        layout.operator("object.restrictview_set", text="Hide Unselected").unselected = True
 
 
 class VIEW3D_MT_make_single_user(bpy.types.Menu):
@@ -701,19 +755,19 @@ class VIEW3D_MT_make_single_user(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
 
-        props = layout.operator("object.make_single_user", properties=True, text="Object")
+        props = layout.operator("object.make_single_user", text="Object")
         props.object = True
 
-        props = layout.operator("object.make_single_user", properties=True, text="Object & ObData")
+        props = layout.operator("object.make_single_user", text="Object & ObData")
         props.object = props.obdata = True
 
-        props = layout.operator("object.make_single_user", properties=True, text="Object & ObData & Materials+Tex")
+        props = layout.operator("object.make_single_user", text="Object & ObData & Materials+Tex")
         props.object = props.obdata = props.material = props.texture = True
 
-        props = layout.operator("object.make_single_user", properties=True, text="Materials+Tex")
+        props = layout.operator("object.make_single_user", text="Materials+Tex")
         props.material = props.texture = True
 
-        props = layout.operator("object.make_single_user", properties=True, text="Animation")
+        props = layout.operator("object.make_single_user", text="Animation")
         props.animation = True
 
 
@@ -738,8 +792,7 @@ class VIEW3D_MT_paint_vertex(bpy.types.Menu):
         layout = self.layout
 
         layout.operator("paint.vertex_color_set")
-        props = layout.operator("paint.vertex_color_set", text="Set Selected Vertex Colors", properties=True)
-        props.selected = True
+        layout.operator("paint.vertex_color_set", text="Set Selected Vertex Colors").selected = True
 
 
 class VIEW3D_MT_hook(bpy.types.Menu):
@@ -750,7 +803,7 @@ class VIEW3D_MT_hook(bpy.types.Menu):
         layout.operator_context = 'EXEC_AREA'
         layout.operator("object.hook_add_newob")
         layout.operator("object.hook_add_selob")
-        
+
         if [mod.type == 'HOOK' for mod in context.active_object.modifiers]:
             layout.separator()
             layout.operator_menu_enum("object.hook_assign", "modifier")
@@ -767,21 +820,21 @@ class VIEW3D_MT_vertex_group(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
         layout.operator_context = 'EXEC_AREA'
-        layout.operator_boolean("object.vertex_group_assign", "new", True, text="Assign to New Group")
-        
+        layout.operator("object.vertex_group_assign", text="Assign to New Group").new = True
+
         ob = context.active_object
         if ob.mode == 'EDIT':
             if ob.vertex_groups and ob.active_vertex_group:
                 layout.separator()
                 layout.operator("object.vertex_group_assign", text="Assign to Active Group")
                 layout.operator("object.vertex_group_remove_from", text="Remove from Active Group")
-                layout.operator_boolean("object.vertex_group_remove_from", "all", True, text="Remove from All")
+                layout.operator("object.vertex_group_remove_from", text="Remove from All").all = True
                 layout.separator()
-        
+
         if ob.vertex_groups and ob.active_vertex_group:
             layout.operator_menu_enum("object.vertex_group_set_active", "group", text="Set Active Group")
             layout.operator("object.vertex_group_remove", text="Remove Active Group")
-            layout.operator_boolean("object.vertex_group_remove", "all", True, text="Remove All Groups")
+            layout.operator("object.vertex_group_remove", text="Remove All Groups").all = True
 
 
 # ********** Sculpt menu **********
@@ -850,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"
 
@@ -863,18 +934,18 @@ class VIEW3D_MT_pose(bpy.types.Menu):
         layout = self.layout
 
         arm = context.active_object.data
-        
+
         layout.menu("VIEW3D_MT_transform")
         layout.menu("VIEW3D_MT_snap")
         if arm.drawtype in ('BBONE', 'ENVELOPE'):
-            layout.operator_enum("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
+            layout.operator("transform.transform", text="Scale Envelope Distance").mode = 'BONESIZE'
 
         layout.menu("VIEW3D_MT_pose_transform")
 
         layout.separator()
 
-        layout.operator("anim.insert_keyframe_menu", text="Insert Keyframe...")
-        layout.operator("anim.delete_keyframe_v3d", text="Delete Keyframe...")
+        layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...")
+        layout.operator("anim.keyframe_delete_v3d", text="Delete Keyframe...")
 
         layout.separator()
 
@@ -885,7 +956,7 @@ class VIEW3D_MT_pose(bpy.types.Menu):
 
         layout.operator("pose.copy")
         layout.operator("pose.paste")
-        layout.operator_boolean("pose.paste", "flipped", True, text="Paste X-Flipped Pose")
+        layout.operator("pose.paste", text="Paste X-Flipped Pose").flipped = True
 
         layout.separator()
 
@@ -901,9 +972,9 @@ class VIEW3D_MT_pose(bpy.types.Menu):
         layout.separator()
 
         layout.operator_context = 'EXEC_AREA'
-        layout.operator_enum("pose.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
-        layout.operator_enum("pose.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
-        layout.operator_enum("pose.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
+        layout.operator("pose.autoside_names", text="AutoName Left/Right").axis = 'XAXIS'
+        layout.operator("pose.autoside_names", text="AutoName Front/Back").axis = 'YAXIS'
+        layout.operator("pose.autoside_names", text="AutoName Top/Bottom").axis = 'ZAXIS'
 
         layout.operator("pose.flip_names")
 
@@ -1053,7 +1124,7 @@ class VIEW3D_MT_edit_mesh_specials(bpy.types.Menu):
         layout.operator_context = 'INVOKE_REGION_WIN'
 
         layout.operator("mesh.subdivide", text="Subdivide")
-        layout.operator_float("mesh.subdivide", "smoothness", 1.0, text="Subdivide Smooth")
+        layout.operator("mesh.subdivide", text="Subdivide Smooth").smoothness = 1.0
         layout.operator("mesh.merge", text="Merge...")
         layout.operator("mesh.remove_doubles")
         layout.operator("mesh.hide", text="Hide")
@@ -1069,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"
 
@@ -1112,27 +1205,27 @@ class VIEW3D_MT_edit_mesh_edges(bpy.types.Menu):
         layout.separator()
 
         layout.operator("mesh.mark_seam")
-        layout.operator_boolean("mesh.mark_seam", "clear", True, text="Clear Seam")
+        layout.operator("mesh.mark_seam", text="Clear Seam").clear = True
 
         layout.separator()
 
         layout.operator("mesh.mark_sharp")
-        layout.operator_boolean("mesh.mark_sharp", "clear", True, text="Clear Sharp")
+        layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
 
         layout.separator()
 
-        layout.operator_enum("mesh.edge_rotate", "direction", 'CW', text="Rotate Edge CW")
-        layout.operator_enum("mesh.edge_rotate", "direction", 'CCW', text="Rotate Edge CCW")
+        layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW'
+        layout.operator("mesh.edge_rotate", text="Rotate Edge CCW").direction = 'CCW'
 
         layout.separator()
 
-        layout.operator("TFM_OT_edge_slide", text="Edge Slide")
+        layout.operator("TRANSFORM_OT_edge_slide", text="Edge Slide")
         layout.operator("mesh.loop_multi_select", text="Edge Loop")
 
         # uiItemO(layout, "Loopcut", 0, "mesh.loop_cut"); // CutEdgeloop(em, 1);
         # uiItemO(layout, "Edge Slide", 0, "mesh.edge_slide"); // EdgeSlide(em, 0,0.0);
 
-        layout.operator_boolean("mesh.loop_multi_select", "ring", True, text="Edge Ring")
+        layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True
 
         layout.operator("mesh.loop_to_region")
         layout.operator("mesh.region_to_loop")
@@ -1151,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()
 
@@ -1168,7 +1262,7 @@ class VIEW3D_MT_edit_mesh_faces(dynamic_menu.DynMenu):
         # uiItemO(layout, NULL, 0, "mesh.face_mode"); // mesh_set_face_flags(em, 1);
         # uiItemBooleanO(layout, NULL, 0, "mesh.face_mode", "clear", 1); // mesh_set_face_flags(em, 0);
 
-        layout.operator_enum("mesh.edge_rotate", "direction", 'CW', text="Rotate Edge CW")
+        layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW'
 
         layout.separator()
 
@@ -1185,7 +1279,7 @@ class VIEW3D_MT_edit_mesh_normals(bpy.types.Menu):
         layout = self.layout
 
         layout.operator("mesh.normals_make_consistent", text="Recalculate Outside")
-        layout.operator_boolean("mesh.normals_make_consistent", "inside", True, text="Recalculate Inside")
+        layout.operator("mesh.normals_make_consistent", text="Recalculate Inside").inside = True
 
         layout.separator()
 
@@ -1203,7 +1297,7 @@ def draw_curve(self, context):
     layout = self.layout
 
     settings = context.tool_settings
-    
+
     layout.menu("VIEW3D_MT_transform")
     layout.menu("VIEW3D_MT_mirror")
     layout.menu("VIEW3D_MT_snap")
@@ -1247,7 +1341,7 @@ class VIEW3D_MT_edit_curve_ctrlpoints(bpy.types.Menu):
         edit_object = context.edit_object
 
         if edit_object.type == 'CURVE':
-            layout.operator_enum("tfm.transform", "mode", 'TILT')
+            layout.operator("transform.transform").mode = 'TILT'
             layout.operator("curve.tilt_clear")
             layout.operator("curve.separate")
 
@@ -1268,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"
@@ -1299,32 +1405,32 @@ class VIEW3D_MT_edit_text_chars(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator_string("font.text_insert", "text", b'\xC2\xA9'.decode(), text="Copyright|Alt C")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xAE'.decode(), text="Registered Trademark|Alt R")
+        layout.operator("font.text_insert", text="Copyright|Alt C").text = b'\xC2\xA9'.decode()
+        layout.operator("font.text_insert", text="Registered Trademark|Alt R").text = b'\xC2\xAE'.decode()
 
         layout.separator()
 
-        layout.operator_string("font.text_insert", "text", b'\xC2\xB0'.decode(), text="Degree Sign|Alt G")
-        layout.operator_string("font.text_insert", "text", b'\xC3\x97'.decode(), text="Multiplication Sign|Alt x")
-        layout.operator_string("font.text_insert", "text", b'\xC2\x8A'.decode(), text="Circle|Alt .")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xB9'.decode(), text="Superscript 1|Alt 1")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xB2'.decode(), text="Superscript 2|Alt 2")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xB3'.decode(), text="Superscript 3|Alt 3")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xBB'.decode(), text="Double >>|Alt >")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xAB'.decode(), text="Double <<|Alt <")
-        layout.operator_string("font.text_insert", "text", b'\xE2\x80\xB0'.decode(), text="Promillage|Alt %")
+        layout.operator("font.text_insert", text="Degree Sign|Alt G").text = b'\xC2\xB0'.decode()
+        layout.operator("font.text_insert", text="Multiplication Sign|Alt x").text = b'\xC3\x97'.decode()
+        layout.operator("font.text_insert", text="Circle|Alt .").text = b'\xC2\x8A'.decode()
+        layout.operator("font.text_insert", text="Superscript 1|Alt 1").text = b'\xC2\xB9'.decode()
+        layout.operator("font.text_insert", text="Superscript 2|Alt 2").text = b'\xC2\xB2'.decode()
+        layout.operator("font.text_insert", text="Superscript 3|Alt 3").text = b'\xC2\xB3'.decode()
+        layout.operator("font.text_insert", text="Double >>|Alt >").text = b'\xC2\xBB'.decode()
+        layout.operator("font.text_insert", text="Double <<|Alt <").text = b'\xC2\xAB'.decode()
+        layout.operator("font.text_insert", text="Promillage|Alt %").text = b'\xE2\x80\xB0'.decode()
 
         layout.separator()
 
-        layout.operator_string("font.text_insert", "text", b'\xC2\xA4'.decode(), text="Dutch Florin|Alt F")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xA3'.decode(), text="British Pound|Alt L")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xA5'.decode(), text="Japanese Yen|Alt Y")
+        layout.operator("font.text_insert", text="Dutch Florin|Alt F").text = b'\xC2\xA4'.decode()
+        layout.operator("font.text_insert", text="British Pound|Alt L").text = b'\xC2\xA3'.decode()
+        layout.operator("font.text_insert", text="Japanese Yen|Alt Y").text = b'\xC2\xA5'.decode()
 
         layout.separator()
 
-        layout.operator_string("font.text_insert", "text", b'\xC3\x9F'.decode(), text="German S|Alt S")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xBF'.decode(), text="Spanish Question Mark|Alt ?")
-        layout.operator_string("font.text_insert", "text", b'\xC2\xA1'.decode(), text="Spanish Exclamation Mark|Alt !")
+        layout.operator("font.text_insert", text="German S|Alt S").text = b'\xC3\x9F'.decode()
+        layout.operator("font.text_insert", text="Spanish Question Mark|Alt ?").text = b'\xC2\xBF'.decode()
+        layout.operator("font.text_insert", text="Spanish Exclamation Mark|Alt !").text = b'\xC2\xA1'.decode()
 
 
 class VIEW3D_MT_edit_meta(bpy.types.Menu):
@@ -1339,7 +1445,7 @@ class VIEW3D_MT_edit_meta(bpy.types.Menu):
         layout.operator("ed.redo")
 
         layout.separator()
-        
+
         layout.menu("VIEW3D_MT_transform")
         layout.menu("VIEW3D_MT_mirror")
         layout.menu("VIEW3D_MT_snap")
@@ -1367,7 +1473,7 @@ class VIEW3D_MT_edit_meta_showhide(bpy.types.Menu):
 
         layout.operator("mball.reveal_metaelems", text="Show Hidden")
         layout.operator("mball.hide_metaelems", text="Hide Selected")
-        layout.operator_boolean("mball.hide_metaelems", "unselected", True, text="Hide Unselected")
+        layout.operator("mball.hide_metaelems", text="Hide Unselected").unselected = True
 
 
 class VIEW3D_MT_edit_lattice(bpy.types.Menu):
@@ -1377,7 +1483,7 @@ class VIEW3D_MT_edit_lattice(bpy.types.Menu):
         layout = self.layout
 
         settings = context.tool_settings
-        
+
         layout.menu("VIEW3D_MT_transform")
         layout.menu("VIEW3D_MT_mirror")
         layout.menu("VIEW3D_MT_snap")
@@ -1400,16 +1506,16 @@ class VIEW3D_MT_edit_armature(bpy.types.Menu):
 
         edit_object = context.edit_object
         arm = edit_object.data
-        
+
         layout.menu("VIEW3D_MT_transform")
         layout.menu("VIEW3D_MT_mirror")
         layout.menu("VIEW3D_MT_snap")
         layout.menu("VIEW3D_MT_edit_armature_roll")
 
         if arm.drawtype == 'ENVELOPE':
-            layout.operator_enum("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
+            layout.operator("transform.transform", text="Scale Envelope Distance").mode = 'BONESIZE'
         else:
-            layout.operator_enum("tfm.transform", "mode", 'BONESIZE', text="Scale B-Bone Width")
+            layout.operator("transform.transform", text="Scale B-Bone Width").mode = 'BONESIZE'
 
         layout.separator()
 
@@ -1432,9 +1538,9 @@ class VIEW3D_MT_edit_armature(bpy.types.Menu):
         layout.separator()
 
         layout.operator_context = 'EXEC_AREA'
-        layout.operator_enum("armature.autoside_names", "type", 'XAXIS', text="AutoName Left/Right")
-        layout.operator_enum("armature.autoside_names", "type", 'YAXIS', text="AutoName Front/Back")
-        layout.operator_enum("armature.autoside_names", "type", 'ZAXIS', text="AutoName Top/Bottom")
+        layout.operator("armature.autoside_names", text="AutoName Left/Right").type = 'XAXIS'
+        layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS'
+        layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS'
         layout.operator("armature.flip_names")
 
         layout.separator()
@@ -1466,9 +1572,9 @@ class VIEW3D_MT_armature_specials(bpy.types.Menu):
         layout.separator()
 
         layout.operator_context = 'EXEC_REGION_WIN'
-        layout.operator_enum("armature.autoside_names", "type", 'XAXIS', text="AutoName Left/Right")
-        layout.operator_enum("armature.autoside_names", "type", 'YAXIS', text="AutoName Front/Back")
-        layout.operator_enum("armature.autoside_names", "type", 'ZAXIS', text="AutoName Top/Bottom")
+        layout.operator("armature.autoside_names", text="AutoName Left/Right").type = 'XAXIS'
+        layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS'
+        layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS'
         layout.operator("armature.flip_names", text="Flip Names")
 
 
@@ -1488,12 +1594,12 @@ class VIEW3D_MT_edit_armature_roll(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator_enum("armature.calculate_roll", "type", 'GLOBALUP', text="Clear Roll (Z-Axis Up)")
-        layout.operator_enum("armature.calculate_roll", "type", 'CURSOR', text="Roll to Cursor")
+        layout.operator("armature.calculate_roll", text="Clear Roll (Z-Axis Up)").type = 'GLOBALUP'
+        layout.operator("armature.calculate_roll", text="Roll to Cursor").type = 'CURSOR'
 
         layout.separator()
 
-        layout.operator_enum("tfm.transform", "mode", 'BONE_ROLL', text="Set Roll")
+        layout.operator("transform.transform", text="Set Roll").mode = 'BONE_ROLL'
 
 # ********** Panel **********
 
@@ -1517,18 +1623,16 @@ class VIEW3D_PT_3dview_properties(bpy.types.Panel):
         col.label(text="Camera:")
         col.prop(view, "camera", text="")
         col.prop(view, "lens")
+        col.label(text="Lock to Object:")
+        col.prop(view, "lock_object", text="")
+        if view.lock_object and view.lock_object.type == 'ARMATURE':
+            col.prop_object(view, "lock_bone", view.lock_object.data, "bones", text="")
 
         col = layout.column(align=True)
         col.label(text="Clip:")
         col.prop(view, "clip_start", text="Start")
         col.prop(view, "clip_end", text="End")
 
-        col = layout.column(align=True)
-        col.label(text="Grid:")
-        col.prop(view, "grid_lines", text="Lines")
-        col.prop(view, "grid_spacing", text="Spacing")
-        col.prop(view, "grid_subdivisions", text="Subdivisions")
-
         layout.column().prop(scene, "cursor_location", text="3D Cursor:")
 
 
@@ -1545,14 +1649,14 @@ class VIEW3D_PT_3dview_name(bpy.types.Panel):
 
         ob = context.active_object
         row = layout.row()
-        row.label(text="", icon='ICON_OBJECT_DATA')
+        row.label(text="", icon='OBJECT_DATA')
         row.prop(ob, "name", text="")
 
         if ob.type == 'ARMATURE' and ob.mode in ('EDIT', 'POSE'):
             bone = context.active_bone
             if bone:
                 row = layout.row()
-                row.label(text="", icon='ICON_BONE_DATA')
+                row.label(text="", icon='BONE_DATA')
                 row.prop(bone, "name", text="")
 
 
@@ -1574,17 +1678,24 @@ class VIEW3D_PT_3dview_display(bpy.types.Panel):
         ob = context.object
 
         col = layout.column()
-        col.prop(view, "display_floor", text="Grid Floor")
         col.prop(view, "display_x_axis", text="X Axis")
         col.prop(view, "display_y_axis", text="Y Axis")
         col.prop(view, "display_z_axis", text="Z Axis")
         col.prop(view, "outline_selected")
-        col.prop(view, "all_object_centers")
+        col.prop(view, "all_object_origins")
         col.prop(view, "relationship_lines")
         if ob and ob.type == 'MESH':
             mesh = ob.data
             col.prop(mesh, "all_edges")
 
+        col = layout.column()
+        col.prop(view, "display_floor", text="Grid Floor")
+        sub = col.column(align=True)
+        sub.active = view.display_floor
+        sub.prop(view, "grid_lines", text="Lines")
+        sub.prop(view, "grid_spacing", text="Spacing")
+        sub.prop(view, "grid_subdivisions", text="Subdivisions")
+
         col = layout.column()
         col.label(text="Shading:")
         col.prop(gs, "material_mode", text="")
@@ -1684,8 +1795,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
             layout.active = view.display_background_image
 
             col = layout.column()
-            col.prop(bg, "image", text="")
-            #col.prop(bg, "image_user")
+            col.template_ID(bg, "image", open="image.open")
             col.prop(bg, "size")
             col.prop(bg, "transparency", slider=True)
 
@@ -1714,13 +1824,13 @@ class VIEW3D_PT_transform_orientations(bpy.types.Panel):
         col = layout.column()
 
         col.prop(view, "transform_orientation")
-        col.operator("tfm.create_orientation", text="Create")
+        col.operator("transform.create_orientation", text="Create")
 
         orientation = view.current_orientation
 
         if orientation:
             col.prop(orientation, "name")
-            col.operator("tfm.delete_orientation", text="Delete")
+            col.operator("transform.delete_orientation", text="Delete")
 
 
 class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
@@ -1771,62 +1881,36 @@ class VIEW3D_PT_context_properties(bpy.types.Panel):
     bl_label = "Properties"
     bl_default_closed = True
 
-    def draw(self, context):
-        import rna_prop_ui
-        # reload(rna_prop_ui)
+    def _active_context_member(self, context):
         obj = context.object
         if obj:
             mode = obj.mode
             if mode == 'POSE':
-                item = "active_pchan"
+                return "active_pose_bone"
             elif mode == 'EDIT' and obj.type == 'ARMATURE':
-                item = "active_bone"
+                return "active_bone"
             else:
-                item = "object"
+                return "object"
 
-            # Draw with no edit button
-            rna_prop_ui.draw(self.layout, context, item, False)
-
-
-# Operators
-from bpy.props import *
-
-
-class OBJECT_OT_select_pattern(bpy.types.Operator):
-    '''Select object matching a naming pattern.'''
-    bl_idname = "object.select_pattern"
-    bl_label = "Select Pattern"
-    bl_register = True
-    bl_undo = True
-
-    pattern = StringProperty(name="Pattern", description="Name filter using '*' and '?' wildcard chars", maxlen=32, default="*")
-    case_sensitive = BoolProperty(name="Case Sensitive", description="Do a case sensitive compare", default=False)
-    extend = BoolProperty(name="Extend", description="Extend the existing selection", default=True)
-
-    def execute(self, context):
+        return ""
 
-        import fnmatch
+    def poll(self, context):
+        member = self._active_context_member(context)
+        if member:
+            context_member = getattr(context, member)
+            return context_member and context_member.keys()
 
-        if self.properties.case_sensitive:
-            pattern_match = fnmatch.fnmatchcase
-        else:
-            pattern_match = lambda a, b: fnmatch.fnmatchcase(a.upper(), b.upper())
+        return False
 
-        for ob in context.visible_objects:
-            if pattern_match(ob.name, self.properties.pattern):
-                ob.selected = True
-            elif not self.properties.extend:
-                ob.selected = False
+    def draw(self, context):
+        import rna_prop_ui
+        # reload(rna_prop_ui)
+        member = self._active_context_member(context)
 
-        return ('FINISHED',)
+        if member:
+            # Draw with no edit button
+            rna_prop_ui.draw(self.layout, context, member, False)
 
-        # TODO - python cant do popups yet
-    '''
-    def invoke(self, context, event):
-        wm = context.manager
-        wm.add_fileselect(self)
-        return ('RUNNING_MODAL',)
-    '''
 
 bpy.types.register(VIEW3D_HT_header) # Header
 
@@ -1870,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
@@ -1884,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)
@@ -1893,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)
@@ -1922,5 +2009,3 @@ bpy.types.register(VIEW3D_PT_transform_orientations)
 bpy.types.register(VIEW3D_PT_etch_a_ton)
 
 bpy.types.register(VIEW3D_PT_context_properties)
-
-bpy.ops.add(OBJECT_OT_select_pattern)