svn merge ^/trunk/blender -r42221:42245
[blender.git] / release / scripts / startup / bl_ui / space_info.py
index 99ee24406ac699ee049b52e291b5ccb153f25312..ab8975d60e84c540d21bbd5886b0e1aecec152bc 100644 (file)
@@ -18,8 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-from bpy.types import Header, Menu, Operator
-from blf import gettext as _
+from bpy.types import Header, Menu
 
 
 class INFO_HT_header(Header):
@@ -46,7 +45,7 @@ class INFO_HT_header(Header):
             sub.menu("INFO_MT_help")
 
         if window.screen.show_fullscreen:
-            layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text=_("Back to Previous"))
+            layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text="Back to Previous")
             layout.separator()
         else:
             layout.template_ID(context.window, "screen", new="screen.new", unlink="screen.delete")
@@ -74,11 +73,11 @@ class INFO_HT_header(Header):
         """
         sinfo = context.space_data
         row = layout.row(align=True)
-        row.prop(sinfo, "show_report_debug", text=_("Debug"))
-        row.prop(sinfo, "show_report_info", text=_("Info"))
-        row.prop(sinfo, "show_report_operator", text=_("Operators"))
-        row.prop(sinfo, "show_report_warning", text=_("Warnings"))
-        row.prop(sinfo, "show_report_error", text=_("Errors"))
+        row.prop(sinfo, "show_report_debug", text="Debug")
+        row.prop(sinfo, "show_report_info", text="Info")
+        row.prop(sinfo, "show_report_operator", text="Operators")
+        row.prop(sinfo, "show_report_warning", text="Warnings")
+        row.prop(sinfo, "show_report_error", text="Errors")
 
         row = layout.row()
         row.enabled = sinfo.show_report_operator
@@ -107,25 +106,25 @@ class INFO_MT_file(Menu):
         layout = self.layout
 
         layout.operator_context = 'EXEC_AREA'
-        layout.operator("wm.read_homefile", text=_("New"), icon='NEW')
+        layout.operator("wm.read_homefile", text="New", icon='NEW')
         layout.operator_context = 'INVOKE_AREA'
-        layout.operator("wm.open_mainfile", text=_("Open..."), icon='FILE_FOLDER')
+        layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER')
         layout.menu("INFO_MT_file_open_recent")
         layout.operator("wm.recover_last_session", icon='RECOVER_LAST')
-        layout.operator("wm.recover_auto_save", text=_("Recover Auto Save..."))
+        layout.operator("wm.recover_auto_save", text="Recover Auto Save...")
 
         layout.separator()
 
         layout.operator_context = 'INVOKE_AREA'
-        layout.operator("wm.save_mainfile", text=_("Save"), icon='FILE_TICK').check_existing = False
+        layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK').check_existing = False
         layout.operator_context = 'INVOKE_AREA'
-        layout.operator("wm.save_as_mainfile", text=_("Save As..."))
+        layout.operator("wm.save_as_mainfile", text="Save As...")
         layout.operator_context = 'INVOKE_AREA'
-        layout.operator("wm.save_as_mainfile", text=_("Save Copy...")).copy = True
+        layout.operator("wm.save_as_mainfile", text="Save Copy...").copy = True
 
         layout.separator()
 
-        layout.operator("screen.userpref_show", text=_("User Preferences..."), icon='PREFERENCES')
+        layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES')
 
         layout.operator_context = 'EXEC_AREA'
         layout.operator("wm.save_homefile")
@@ -134,8 +133,8 @@ class INFO_MT_file(Menu):
         layout.separator()
 
         layout.operator_context = 'INVOKE_AREA'
-        layout.operator("wm.link_append", text=_("Link"))
-        props = layout.operator("wm.link_append", text=_("Append"))
+        layout.operator("wm.link_append", text="Link")
+        props = layout.operator("wm.link_append", text="Append")
         props.link = False
         props.instance_groups = False
 
@@ -151,7 +150,7 @@ class INFO_MT_file(Menu):
         layout.separator()
 
         layout.operator_context = 'EXEC_AREA'
-        layout.operator("wm.quit_blender", text=_("Quit"), icon='QUIT')
+        layout.operator("wm.quit_blender", text="Quit", icon='QUIT')
 
 
 class INFO_MT_file_import(Menu):
@@ -171,6 +170,8 @@ class INFO_MT_file_export(Menu):
         if hasattr(bpy.types, "WM_OT_collada_export"):
             self.layout.operator("wm.collada_export", text="COLLADA (.dae)")
 
+        self.layout.operator("export_mesh.wavefront", text="Wavefront (.obj), BMesh")
+
 
 class INFO_MT_file_external_data(Menu):
     bl_label = "External Data"
@@ -178,8 +179,8 @@ class INFO_MT_file_external_data(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("file.pack_all", text=_("Pack into .blend file"))
-        layout.operator("file.unpack_all", text=_("Unpack into Files"))
+        layout.operator("file.pack_all", text="Pack into .blend file")
+        layout.operator("file.unpack_all", text="Unpack into Files")
 
         layout.separator()
 
@@ -197,17 +198,17 @@ class INFO_MT_mesh_add(Menu):
         layout = self.layout
 
         layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text=_("Plane"))
-        layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text=_("Cube"))
-        layout.operator("mesh.primitive_circle_add", icon='MESH_CIRCLE', text=_("Circle"))
-        layout.operator("mesh.primitive_uv_sphere_add", icon='MESH_UVSPHERE', text=_("UV Sphere"))
-        layout.operator("mesh.primitive_ico_sphere_add", icon='MESH_ICOSPHERE', text=_("Icosphere"))
-        layout.operator("mesh.primitive_cylinder_add", icon='MESH_CYLINDER', text=_("Cylinder"))
-        layout.operator("mesh.primitive_cone_add", icon='MESH_CONE', text=_("Cone"))
+        layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text="Plane")
+        layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text="Cube")
+        layout.operator("mesh.primitive_circle_add", icon='MESH_CIRCLE', text="Circle")
+        layout.operator("mesh.primitive_uv_sphere_add", icon='MESH_UVSPHERE', text="UV Sphere")
+        layout.operator("mesh.primitive_ico_sphere_add", icon='MESH_ICOSPHERE', text="Icosphere")
+        layout.operator("mesh.primitive_cylinder_add", icon='MESH_CYLINDER', text="Cylinder")
+        layout.operator("mesh.primitive_cone_add", icon='MESH_CONE', text="Cone")
         layout.separator()
-        layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text=_("Grid"))
-        layout.operator("mesh.primitive_monkey_add", icon='MESH_MONKEY', text=_("Monkey"))
-        layout.operator("mesh.primitive_torus_add", text=_("Torus"), icon='MESH_TORUS')
+        layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text="Grid")
+        layout.operator("mesh.primitive_monkey_add", icon='MESH_MONKEY', text="Monkey")
+        layout.operator("mesh.primitive_torus_add", text="Torus", icon='MESH_TORUS')
 
 
 class INFO_MT_curve_add(Menu):
@@ -218,11 +219,11 @@ class INFO_MT_curve_add(Menu):
         layout = self.layout
 
         layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text=_("Bezier"))
-        layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text=_("Circle"))
-        layout.operator("curve.primitive_nurbs_curve_add", icon='CURVE_NCURVE', text=_("Nurbs Curve"))
-        layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text=_("Nurbs Circle"))
-        layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text=_("Path"))
+        layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier")
+        layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle")
+        layout.operator("curve.primitive_nurbs_curve_add", icon='CURVE_NCURVE', text="Nurbs Curve")
+        layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text="Nurbs Circle")
+        layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text="Path")
 
 
 class INFO_MT_edit_curve_add(Menu):
@@ -249,12 +250,12 @@ class INFO_MT_surface_add(Menu):
         layout = self.layout
 
         layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text=_("NURBS Curve"))
-        layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text=_("NURBS Circle"))
-        layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text=_("NURBS Surface"))
-        layout.operator("surface.primitive_nurbs_surface_cylinder_add", icon='SURFACE_NCYLINDER', text=_("NURBS Cylinder"))
-        layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text=_("NURBS Sphere"))
-        layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text=_("NURBS Torus"))
+        layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
+        layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
+        layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text="NURBS Surface")
+        layout.operator("surface.primitive_nurbs_surface_cylinder_add", icon='SURFACE_NCYLINDER', text="NURBS Cylinder")
+        layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere")
+        layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus")
 
 
 class INFO_MT_armature_add(Menu):
@@ -265,7 +266,7 @@ class INFO_MT_armature_add(Menu):
         layout = self.layout
 
         layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("object.armature_add", text=_("Single Bone"), icon='BONE_DATA')
+        layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA')
 
 
 class INFO_MT_add(Menu):
@@ -276,39 +277,39 @@ class INFO_MT_add(Menu):
 
         layout.operator_context = 'EXEC_SCREEN'
 
-        #layout.operator_menu_enum("object.mesh_add", "type", text=_("Mesh"), icon='OUTLINER_OB_MESH')
+        #layout.operator_menu_enum("object.mesh_add", "type", text="Mesh", icon='OUTLINER_OB_MESH')
         layout.menu("INFO_MT_mesh_add", icon='OUTLINER_OB_MESH')
 
-        #layout.operator_menu_enum("object.curve_add", "type", text=_("Curve"), icon='OUTLINER_OB_CURVE')
+        #layout.operator_menu_enum("object.curve_add", "type", text="Curve", icon='OUTLINER_OB_CURVE')
         layout.menu("INFO_MT_curve_add", icon='OUTLINER_OB_CURVE')
-        #layout.operator_menu_enum("object.surface_add", "type", text=_("Surface"), icon='OUTLINER_OB_SURFACE')
+        #layout.operator_menu_enum("object.surface_add", "type", text="Surface", icon='OUTLINER_OB_SURFACE')
         layout.menu("INFO_MT_surface_add", icon='OUTLINER_OB_SURFACE')
-        layout.operator_menu_enum("object.metaball_add", "type", text=_("Metaball"), icon='OUTLINER_OB_META')
+        layout.operator_menu_enum("object.metaball_add", "type", text="Metaball", icon='OUTLINER_OB_META')
         layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("object.text_add", text=_("Text"), icon='OUTLINER_OB_FONT')
+        layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
         layout.separator()
 
         layout.menu("INFO_MT_armature_add", icon='OUTLINER_OB_ARMATURE')
-        layout.operator("object.add", text=_("Lattice"), icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
-        layout.operator("object.add", text=_("Empty"), icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
+        layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
+        layout.operator("object.add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
         layout.separator()
 
-        layout.operator("object.speaker_add", text=_("Speaker"), icon='OUTLINER_OB_SPEAKER')
+        layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER')
         layout.separator()
 
-        layout.operator("object.camera_add", text=_("Camera"), icon='OUTLINER_OB_CAMERA')
+        layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
         layout.operator_context = 'EXEC_SCREEN'
-        layout.operator_menu_enum("object.lamp_add", "type", text=_("Lamp"), icon='OUTLINER_OB_LAMP')
+        layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP')
         layout.separator()
 
-        layout.operator_menu_enum("object.effector_add", "type", text=_("Force Field"), icon='OUTLINER_OB_EMPTY')
+        layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_EMPTY')
         layout.separator()
 
         if(len(bpy.data.groups) > 10):
             layout.operator_context = 'INVOKE_DEFAULT'
-            layout.operator("object.group_instance_add", text=_("Group Instance..."), icon='OUTLINER_OB_EMPTY')
+            layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_EMPTY')
         else:
-            layout.operator_menu_enum("object.group_instance_add", "group", text=_("Group Instance"), icon='OUTLINER_OB_EMPTY')
+            layout.operator_menu_enum("object.group_instance_add", "group", text="Group Instance", icon='OUTLINER_OB_EMPTY')
 
 
 class INFO_MT_game(Menu):
@@ -338,13 +339,13 @@ class INFO_MT_render(Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("render.render", text=_("Render Image"), icon='RENDER_STILL')
-        layout.operator("render.render", text=_("Render Animation"), icon='RENDER_ANIMATION').animation = True
+        layout.operator("render.render", text="Render Image", icon='RENDER_STILL')
+        layout.operator("render.render", text="Render Animation", icon='RENDER_ANIMATION').animation = True
 
         layout.separator()
 
-        layout.operator("render.opengl", text=_("OpenGL Render Image"))
-        layout.operator("render.opengl", text=_("OpenGL Render Animation")).animation = True
+        layout.operator("render.opengl", text="OpenGL Render Image")
+        layout.operator("render.opengl", text="OpenGL Render Animation").animation = True
 
         layout.separator()
 
@@ -360,57 +361,30 @@ class INFO_MT_help(Menu):
 
         layout = self.layout
 
-        layout.operator("wm.url_open", text=_("Manual"), icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
-        layout.operator("wm.url_open", text=_("Release Log"), icon='URL').url = 'http://www.blender.org/development/release-logs/blender-259/'
+        layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:2.6/Manual'
+        layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-260/'
 
         layout.separator()
 
-        layout.operator("wm.url_open", text=_("Blender Website"), icon='URL').url = 'http://www.blender.org/'
-        layout.operator("wm.url_open", text=_("Blender e-Shop"), icon='URL').url = 'http://www.blender.org/e-shop'
-        layout.operator("wm.url_open", text=_("Developer Community"), icon='URL').url = 'http://www.blender.org/community/get-involved/'
-        layout.operator("wm.url_open", text=_("User Community"), icon='URL').url = 'http://www.blender.org/community/user-community/'
+        layout.operator("wm.url_open", text="Blender Website", icon='URL').url = 'http://www.blender.org/'
+        layout.operator("wm.url_open", text="Blender e-Shop", icon='URL').url = 'http://www.blender.org/e-shop'
+        layout.operator("wm.url_open", text="Developer Community", icon='URL').url = 'http://www.blender.org/community/get-involved/'
+        layout.operator("wm.url_open", text="User Community", icon='URL').url = 'http://www.blender.org/community/user-community/'
         layout.separator()
-        layout.operator("wm.url_open", text=_("Report a Bug"), icon='URL').url = 'http://projects.blender.org/tracker/?atid=498&group_id=9&func=browse'
+        layout.operator("wm.url_open", text="Report a Bug", icon='URL').url = 'http://projects.blender.org/tracker/?atid=498&group_id=9&func=browse'
         layout.separator()
 
-        layout.operator("wm.url_open", text=_("Python API Reference"), icon='URL').url = bpy.types.WM_OT_doc_view._prefix
-        layout.operator("help.operator_cheat_sheet", icon='TEXT')
+        layout.operator("wm.url_open", text="Python API Reference", icon='URL').url = bpy.types.WM_OT_doc_view._prefix
+        layout.operator("wm.operator_cheat_sheet", icon='TEXT')
         layout.operator("wm.sysinfo", icon='TEXT')
         layout.separator()
         if sys.platform[:3] == "win":
             layout.operator("wm.console_toggle", icon='CONSOLE')
             layout.separator()
-        layout.operator("anim.update_data_paths", text=_("FCurve/Driver Version fix"), icon='HELP')
+        layout.operator("anim.update_data_paths", text="FCurve/Driver Version fix", icon='HELP')
+        layout.operator("logic.texface_convert", text="TexFace to Material Convert", icon='GAME')
         layout.separator()
         layout.operator("wm.splash", icon='BLENDER')
 
-
-# Help operators
-
-
-class HELP_OT_operator_cheat_sheet(Operator):
-    bl_idname = "help.operator_cheat_sheet"
-    bl_label = "Operator Cheat Sheet"
-
-    def execute(self, context):
-        op_strings = []
-        tot = 0
-        for op_module_name in dir(bpy.ops):
-            op_module = getattr(bpy.ops, op_module_name)
-            for op_submodule_name in dir(op_module):
-                op = getattr(op_module, op_submodule_name)
-                text = repr(op)
-                if text.split("\n")[-1].startswith('bpy.ops.'):
-                    op_strings.append(text)
-                    tot += 1
-
-            op_strings.append('')
-
-        textblock = bpy.data.texts.new("OperatorList.txt")
-        textblock.write('# %d Operators\n\n' % tot)
-        textblock.write('\n'.join(op_strings))
-        self.report({'INFO'}, "See OperatorList.txt textblock")
-        return {'FINISHED'}
-
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)