Added torus icon to the add menu, and made naming consistent with the other add menus.
authorWilliam Reynish <william@reynish.com>
Sat, 17 Oct 2009 21:08:22 +0000 (21:08 +0000)
committerWilliam Reynish <william@reynish.com>
Sat, 17 Oct 2009 21:08:22 +0000 (21:08 +0000)
release/scripts/io/add_mesh_torus.py
release/scripts/ui/space_info.py

index a0f41db15d67808931270b0c77ae0fd57bce4698..f413fe72e4d15a88374929a51e2fa064e4ee7726 100644 (file)
@@ -92,7 +92,7 @@ bpy.ops.add(MESH_OT_primitive_torus_add)
 # Add to a menu
 import dynamic_menu
 import space_info
-menu_item = dynamic_menu.add(bpy.types.INFO_MT_mesh_add, (lambda self, context: self.layout.itemO("mesh.primitive_torus_add", text="Add Torus")) )
+menu_item = dynamic_menu.add(bpy.types.INFO_MT_mesh_add, (lambda self, context: self.layout.itemO("mesh.primitive_torus_add", text="Torus", icon='ICON_MESH_DONUT')) )
 
 if __name__ == "__main__":
        bpy.ops.mesh.primitive_torus_add()
\ No newline at end of file
index 961329ea5d06f1556bed79059cda8bad3ef243a0..7246159be7a66378a8d40f9387a47f3e673ae6ce 100644 (file)
@@ -124,20 +124,20 @@ class INFO_MT_file_external_data(bpy.types.Menu):
 
 
 class INFO_MT_mesh_add(dynamic_menu.DynMenu):
-       __label__ = "Add Mesh"
+       __label__ = "Mesh"
        def draw(self, context):
                layout = self.layout
                layout.operator_context = 'INVOKE_REGION_WIN'
-               layout.itemO("mesh.primitive_plane_add", icon='ICON_MESH_PLANE')
-               layout.itemO("mesh.primitive_cube_add", icon='ICON_MESH_CUBE')
-               layout.itemO("mesh.primitive_circle_add", icon='ICON_MESH_CIRCLE')
-               layout.itemO("mesh.primitive_uv_sphere_add", icon='ICON_MESH_UVSPHERE')
-               layout.itemO("mesh.primitive_ico_sphere_add", icon='ICON_MESH_ICOSPHERE')
-               layout.itemO("mesh.primitive_cylinder_add", icon='ICON_MESH_TUBE')
-               layout.itemO("mesh.primitive_cone_add", icon='ICON_MESH_CONE')
+               layout.itemO("mesh.primitive_plane_add", icon='ICON_MESH_PLANE', text="Plane")
+               layout.itemO("mesh.primitive_cube_add", icon='ICON_MESH_CUBE', text="Cube")
+               layout.itemO("mesh.primitive_circle_add", icon='ICON_MESH_CIRCLE', text="Circle")
+               layout.itemO("mesh.primitive_uv_sphere_add", icon='ICON_MESH_UVSPHERE', text="UV Sphere")
+               layout.itemO("mesh.primitive_ico_sphere_add", icon='ICON_MESH_ICOSPHERE', text="Icosphere")
+               layout.itemO("mesh.primitive_cylinder_add", icon='ICON_MESH_TUBE', text="Tube")
+               layout.itemO("mesh.primitive_cone_add", icon='ICON_MESH_CONE', text="Cone")
                layout.itemS()
-               layout.itemO("mesh.primitive_grid_add", icon='ICON_MESH_GRID')
-               layout.itemO("mesh.primitive_monkey_add", icon='ICON_MESH_MONKEY')
+               layout.itemO("mesh.primitive_grid_add", icon='ICON_MESH_GRID', text="Grid")
+               layout.itemO("mesh.primitive_monkey_add", icon='ICON_MESH_MONKEY', text="Monkey")
 
 class INFO_MT_add(bpy.types.Menu):
        __label__ = "Add"